$ pyupgrade --keep-percent-format --py39-plus \
Bio/*.py Bio/*/*.py BioSQL/*.py
Didn't find any changes in tests, scripts, or docs.
Followed by removing a few now redundant imports
and black in one case.
Reverted unwanted changes (mostly arrays in tests, but also
some whitespace in doctests).
Remaining changes are standardising spacing between module
docstring and imports, and lower-case \x<hex> in strings.
Main change is to simple power expressions, e.g.
>>> pssm.distribution(background=background, precision=10 ** 4)
becomes:
>>> pssm.distribution(background=background, precision=10**4)
Also standardises string prefixes (e.g raw bytes), and
there are some tweaks to multi-line expressions.
I have used the "black --target-version py37 ..." form, but
it does not seem to make any difference over the default.
Note also had to update to blacken-docs v1.12.1
See https://github.com/codespell-project/codespell
We have lots of false positives, so currently this
needs manual review and/or a list of biological
terms to ignore like "Ser" and "OTU".
Used this hack from https://github.com/psf/black/issues/1288
$ pip install black==19.3b0 && black . && pip install black==19.10b && black .
I then manually reverted changes to a handful of explicit data
structures where the magic trailing comma should be retained
(indicates to black not to squash into one line).
Doing this dramatically improves the changes from trying black
version 21.7b0 (right now just four minor changes).
Peter's comment: These additional changes after black was applied
in #2191 were with black v19.3b0 or 19.10b0 (latest), suggesting I had
accidentally using an unreleased branch of black.
GenBank files can contain multiline comments in the form
COMMENT ##MIENS-Data-START##
environment :: Temperate shelf and sea biome
[ENVO:00000895], coastal water body
[ENVO:02000049], coastal water
[ENVO:00002150]
##MIENS-Data-END##
Previously lines after the 'environment' comment key were attached to the
global comment instead of the structured comment, resulting in
["MIENS-Data"]["environment"] == "Temperate shelf and sea biome"
After this commit the extra lines are attached to the value at the previous
structured comment's key, resulting in
["MIENS-Data"]["environment"] == "Temperate shelf and sea biome [ENVO:00000895], coastal water body [ENVO:02000049], coastal water [ENVO:00002150]"
Issue: #2177
* move with block inside each submodule
* fix SeqXmlIO
* cleanup
* travis
* fix for python2
* travis being a jerk
* travis being a jerk
* hello goodbye
* putting changes back in
* travis being obnoxious
Style changes to comply with E127 and E128 in Bio folder.
Also added full stops to SearchIO docstrings set via the property function, see PEP257.
Work in reference to issue #1515, squashed commit of pull request #1768.