$ 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.
Handles versions of python 3 which are not python3.9
(Written before the introduction of the
SequenceDataAbstractBaseClass, rebased
but not yet updated accordingly)
* use bytes if the sequence is fully defined
* black
* flake
* flake
* Add defined attribute to Seq (#3779)
* Add defined attribute to Seq
- Add "defined" attribute to Seq object that returns true if the Seq
contains a fully defined sequence and false if it is unknown or
partial
- Fixes#3667
* Update run_tests.py to support Python 3.10
- The run_tests.py script assumes that python has a single digit major
version and single digit minor version, update to support any size
version numbers
* Simplify Seq.defined check
* Address review comments
- Check if data is defined in a more OO way
- Update partial data types to be considered defined if they contain a
complete sequence
* use bytes if the sequence is fully defined
* update defined now that zero-length undefined/partially defined sequences cannot occur
* clean up defined
* remove check for zero length
* update docstrings
Co-authored-by: Neil P <npars@users.noreply.github.com>
* Add defined attribute to Seq
- Add "defined" attribute to Seq object that returns true if the Seq
contains a fully defined sequence and false if it is unknown or
partial
- Fixes#3667
* Update run_tests.py to support Python 3.10
- The run_tests.py script assumes that python has a single digit major
version and single digit minor version, update to support any size
version numbers
* Simplify Seq.defined check
* Address review comments
- Check if data is defined in a more OO way
- Update partial data types to be considered defined if they contain a
complete sequence
* Adds __iter__ function to _SeqAbstractBaseClass
This dramatically improves performance when calling `list(Seq(...))`
* Adds Seq test_cast_to_list
* Update CONTRIB.rst
* Updates tests with empty Seqs, MutableSeq, and partial Seqs
Using pyupgrade v2.25.0,
$ pyupgrade --py37-plus Bio/Seq*.py Bio/SeqUtils/*.py
Reverted two cases by hand were the old style % formating was
replaced with (what I considered to be) a less readable format
method usage.
* partial
* __getitem__
* added tests
* more tests
* simplify
* negative step
* cleanup
* added tests
* addition
* addition tests
* added docstring
* tutorial update
* upper, lower
* add missing methods
* flake
* black & blue
* use consistent black version
* clean up __add__ method by relying on inheritance
* style
* add test for repr on long sequences
* added a test for UndefinedSqeuenceData replacement with different length substring
* added a test for negative length
* style
* simplify
* adding tests
* style
* cleanup
* workaround for python3.7
* put __slots__ on _SeqAbstractBaseClass, Seq, MutableSeq to reduce their memory usage; store attributes in _data instead
* add __slots__ to SequenceDataAbstractBaseClass, _UndefinedSequenceData, _TwoBitSequenceData, _BioSQLSequenceData
* fix __delattr__
* silly stuff from Travis
* Using a private ._attributes dictionary to store the attributes
* put __slots__ on the base class only, and let python create __dict__ on demand on the subclass
* added some tests
* travis
* make Seq, MutableSeq methods consistent
* add tests for MutableSeq
* add tests for methods
* tests on subsequences are pointless here as they will return a bytes object
* added BioSQL tests
* travis
* travis
* travis
* travis
* update docstrings, and avoid subclassing __bytes__ in BioSQL
* use UndefinedSequenceData for undefined sequences
* travis
* typo and some silly stuff
* make UndefinedSequenceData a private class
* Peter's suggestions
* add test script
* add test files
* done
* travis
* travis being obnoxious
* remove unnecessary str support
* avoid using PyUnicode_New as it's not in pypy
* add some documentation
* add some documentation
* move to a comment to travis can't bitch about it
* move to a comment to travis can't bitch about it
* documentation update
* fix warning
* Let's see why 32bit windows is not happy
* Let's see why 32bit windows is not happy
* check the file descriptor in advance; on Windows, lseek with a closed file descriptor will by default close the application
* lseek is fubar on windows
* lseek and read apparently are fubar on Windows. Use Python to seek/read, and numpy to keep the code reasonably fast
* deal with closed files
* travis
* more inane stuff from Travis
* weird
* reverting previous change to the tutorial text
* reverting changes to test_SeqIO.py; these are not needed anymore now that twoBit file reading is done via Python
* improving speed
* using C code for 2bit to sequence conversion
* adding missing C code
* expand exception
* accept formats I and L
* release buffer
* travis
* windows
* private
* NEWS
* MutableSeq bytearray
* bytes in Seq
* use bytes in Seq
* travis
* travis
* travis
* added some tests
* flake is wasting my time
* black is wasting my time