[2.3.0] - 2022-08-08
Enhancements
- Added new command line argument
-v/--version
. User can print out current PythonTA version usingpython -m python_ta -v
. - Preconditions, postconditions, and representation invariants are now parsed only once and compiled.
- Can configure custom error messages for pylint in a toml file.
missing_space_in_doctest_checker
is now able to check doctests in python modules and classes.- Updated to Pylint v2.14. See "New checks" below for the new checkers enabled by default.
- Added new
python_ta.debug
module with anAccumulationTable
context manager for loop print debugging. - Improve message for R1710 (inconsistent-return-statements)
Bug fixes
- Function
check_all_contracts
skips contract checks for functions and classes which are not defined in a module whose name is passed as an argument. Ifdecorate_main
argument isTrue
, functions and classes defined in__main__
module will be checked without needing to pass in additional arguments.
New checkers
Custom checkers:
type-is-assigned
: Flag when a type is not annotated but rather assigned in a function or class definition.
Pylint checkers v2.13:
modified-iterating-list
modified-iterating-dict
modified-iterating-set
unnecessary-ellipsis
bad-file-encoding
Pylint checkers v2.14:
comparison-of-constants
potential-index-error
unnecessary-list-index-lookup
duplicate-value
super-without-brackets
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.