Commit Graph

36 Commits

Author SHA1 Message Date
de0bb21fb3 Apply isort (forcing single lines, not sorting by type) via ruff
$ ruff check --fix --select=I \
  --config=lint.isort.force-single-line=true \
  --config=lint.isort.order-by-type=false \
  BioSQL/ Bio/ Tests/ Scripts/ Doc/ setup.py

Using ruff version 0.4.10
2024-06-26 15:31:39 +09:00
68fea9c46a Update get_prosite_raw again
It gives 404 errors again, partly reverts fix in #3511
and should still cope with redirection to main page as
a less explicit failure mode.
2024-06-26 12:37:32 +09:00
19a8a2f871 UniProt returns HTTP Error 400 now, not 404
[ci skip]
2022-11-18 14:53:19 +00:00
ddc7f2aeed More f-strings using flynt 0.69
A large chunk of Bio/ keeping the lines change to
just over 200 to help with reviewing.
2021-09-17 09:04:20 +01:00
e5c9cabf8c pyupgrade: f-strings (easy cases)
Ran this:

$ pyupgrade --py37-plus Bio/*.py Bio/*/*.py Bio/*/*/*.py BioSQL/*.py
$ black Bio/ BioSQL/

Then reverted any changes adding a .format method, spotted with:

$ git diff | grep "^+" | grep -E "(\.format|\+\+\+)"
2021-09-11 12:30:38 +01:00
0e6abf6bf3 fix ExPASy.get_prosite_raw for invalid queries (#3511)
* fix ExPASy.get_prosite_raw for invalid queries

* the little brat is whining again
2021-03-22 18:15:03 +09:00
12fa7f3731 With with for ExPASy network handles
This didn't work on Python 2, preferred on Python 3.
2020-01-16 13:02:59 +00:00
708945d5c1 Remove Python 2 references in ExPASy doctests 2020-01-16 13:02:59 +00:00
e5d5e516d4 fix exceptions in Bio/ExPASy (#2547) 2020-01-15 15:28:57 +09:00
29b467a2d8 Don't need local variable just for return value 2020-01-09 16:47:59 +00:00
ae46a4111d removed _binary_to_string_handle 2020-01-09 16:44:15 +00:00
220ccca8b9 Directly import urllib, not via Bio._py3k (#2476)
Part of addressing #2420, removal of Bio._py3k now that we've dropped Python 2 support.

Also removes underscores in the imports from urllib, see #2483.
2020-01-04 22:35:44 +00:00
dfc38599b1 Apply black style to Bio.ExPASy. 2019-12-16 15:26:54 +00:00
abc7304279 Removes files created during run of run_tests.py 2019-08-05 10:05:43 +01:00
b58c4b613b Using tool unify to convert Bio/ to use double quotes
Using https://github.com/myint/unify for this:

$ unify --quote \" --in-place Bio/*.py Bio/*/*.py Bio/*/*/*.py
$ git checkout Bio/Restriction/Restriction_Dictionary.py

Note excluded automatically generated file
Bio/Restriction/Restriction_Dictionary.py
2019-08-02 14:10:22 +01:00
d311208a53 Fix Bio/ExPASy doctests 2019-04-29 22:37:53 +02:00
2ceb458e07 Remove Bio.ExPASy.sprot_search_ful and ..._de
This will close #253 and some of the dead URLs
noted on #1826.

This has not followed the letter of our deprecation
policy (since there was no BiopythonDeprecationWarning
issued on attempted use, but attempted use would just
fail), https://biopython.org/wiki/Deprecation_policy
2018-10-19 17:11:45 +01:00
47cdbf7f5f Move expasy URLs to https 2017-10-27 15:55:21 +01:00
9bfb8b1502 replace expasy.ch by expasy.org 2017-10-27 15:55:21 +01:00
009f9ef59a docstring work for Bio.ExPASy
Making both RST validator and pydocstyle happy
(other than lots of missing docstrings still).
2017-06-16 15:39:59 +01:00
316e43ce23 Update Bio.ExPASy URLs & convert to text.
Update URLs to fix #1145.

Following the example of our other online modules where we
have parsers expecting text not bytes under Python 3, wrap
the network handle to get text mode.
2017-05-19 13:04:01 +01:00
1119425f45 PEP8 E402 module level imports vs __docformat__ placement
This was mostly due to the latest version of the pep8
tool being stricter and wanting the __docformat__ line
after the module level imports.

Rather than moving them all, I removed them - and we'll
switch to using reStructuredText as the default when
converting the docstrings into API HTML pages for the
website.

This commit also includes assorted other PEP8 fixes which
our recommend git pre-commit hook spotted, and I fixed by
hand.
2016-05-10 17:13:46 +01:00
4313804984 PEP8 and RST docstrings for Bio.codonalign, Bio.DocSQL, etc 2014-11-12 21:51:10 +09:00
b56c18a56a PEP8 fixes Emboss, Entrez, ExPASy 2014-11-01 14:43:46 +00:00
fa6fe3ab2f Python3 import fallbacks for urllib/urllib2/urlparse via Bio._py3k 2013-11-03 12:31:45 +00:00
83f9b75384 Various whitespace fixes, mostly around commas and colons. 2012-12-07 09:47:08 +00:00
a7db23aa4b Add blank lines where needed (PEP8 E302). 2012-12-05 19:56:01 +08:00
651916372a Trim EOL whitespace (PEP8 W291, W293).
Whitespace in doctests and format examples has been left as is.
2012-12-04 17:51:22 +08:00
f019593be4 Removing deprecated code that won't be in Release 1.57 2010-12-21 19:38:13 +09:00
02e079ec25 Replacing DeprecationWarnings with Bio.BiopythonDeprecatingWarnings 2010-09-11 13:32:15 +09:00
ac76fe1dc5 Updating the comment; scanprosite1 has already been removed from this module 2010-08-21 15:03:47 +09:00
6b25d7e1fb Removing deprecated code 2010-05-21 14:16:34 +09:00
a8922a44cf Fixed typo in new warning. 2009-11-16 11:43:28 +00:00
6689bf8657 Update Bio.ExPASy.get_sprot_raw() to use URL http://www.uniprot.org/uniprot/XXX.txt as per http://www.expasy.ch/expasy_urls.html since the old URL http://www.expasy.ch/cgi-bin/get-sprot-raw.pl?XXX is currently returning FASTA format. See report via mailing list. This fixes test_SeqIO_online.py 2009-11-16 10:19:57 +00:00
a5b72f0c69 Add a deprecation warning for scanprosite1. 2009-03-15 10:15:23 +00:00
763d19f2b3 Moving the Prosite parsers from Bio.Prosite to Bio.ExPASy. Adding ScanProsite
to Bio.ExPASy.
2009-03-15 08:22:31 +00:00