[2.2.0] - 2021-12-09
Enhancements
- Added support for postconditions in function docstring.
- Improve error message of
unncessary-indexing
checker. - Added CLI for
python_ta.contracts
module for executing a file with contract checking
($ python -m python_ta.contracts FILE
) - Added two new command line interfaces. User can print out the default PythonTA configuration file in the command line using
python -m python_ta -g
and can specify the output format of the reporter usingpython -m python_ta --output-format FILE
. - Updated to Pylint v2.12. See "New checks" below for the new checkers enabled by default.
- Register ending location setter as pylint plugin.
Bug fixes
- Fix bugs in
unnecessary-indexing
checker:- False positive when the same loop variable is used in two loops in sequence.
- False negative when the loop variable can be simplified, but is also shadowed in the
the loop body.
- Fix HTML report to link correctly to specific errors on the PythonTA documentation website.
- Fix bug when setting ending locations for
ClassDef
s that have no decorators.
New checkers
Pylint checkers v2.12:
use-implicit-booleaness-not-len
(renamed fromlen-as-condition
)
Pylint checkers v2.11:
consider-using-f-string
For more information on these checkers, please see the Pylint release notes. Note that the above list only contains the Pylint checkers enabled by default in PythonTA.