[2.7.0] 2023-12-14
Enhancements
- Added new configuration option
use-pyta-error-messages
to let users choose whether PythonTA should overwrite pylint's error messages. - Both PlainReporter and ColorReporter emphasize specific code chunks by using overline characters under any part that is highlighted as ERROR.
- Added snapshot function for deriving a list of dictionaries containing local variables from relevant functions and/or stack frames.
- Added new configuration option
allow-pylint-comments
to let users choose whether PythonTA should allow comments beginning with pylint: or not. AccumulationTable
can now track variables initialized within thefor
loop. Prior, only variables initialized before thefor
loop could be tracked.AccumulationTable
now stores deep copies of objects rather than shallow copies, thus fixing issues that come up in case of mutation during loop.AccumulationTable
can now take in any accumulator expressions, for eg.x * 2
, instead of just variables.AccumulationTable
now has an optional initialization argumentoutput
which allows the users to choose whether they want to write the Accumulation Table to a file.- Created a
RecursionTable
context manager for recursive tracing using a tabular output. - Support Python 3.12 (requiring upgrade to pylint and astroid 3.0)
Bug fixes
- Fix bug in ending location setting for
Attribute
andDelAttr
nodes when the same attribute was accessed twice on the same line. - Fix bug where the
naming-convention-violation
checker was checking variables defined in a module's main block. This was inconsistent with theforbidden-global-variables
checker. - Fixed bug with
invalid-range-index
: do not attempt any inference of variables inrange
expressions. All range arguments involving variables will be ignored by this checker.
New checkers
Pylint checkers v3.0:
invalid-field-call
return-in-finally
kwarg-superseded-by-positional-arg
unnecessary-negation
(renamed fromunneeded-not
)
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.
Internal
- Remove experimental type inference code.