[2.12.0] 2025-12-08
✨ Enhancements
- Updated
SnapshotTracerto open the generated HTML report in a one-shot server, instead of opening the HTML file directly. - Extended infinite-loop check to flag while loops whose conditions depend only on immutable variables and are not reassigned in the loop body.
- Added custom renderers for the PEP8 error codes: E204, E225, E231
- Added custom renderers for the PEP8 error codes: E271, E274, E502
- Updated the message format for Pycodestyle error messages to be more concise
- Added custom renderer for
line-too-longto improve its error snippet to highlight the overflow segment instead of the entire line. - Improved error message for error C0305
trailing-newlinesand inserted a "DELETE" comment for each trailing newline. - Added a solution to prevent possible large snippets created by the following errors: pylint error C0305, and pycodestyle errors E303, E304
- Added markdown rendering to display code in error messages
- Improved RI checking to raise a warning when a
NameErroris raised and the missing name matches an instance attribute, and is due to an omittedself.in the RI. - Extended
AccumulationTableclass to support multiple loops in sequence within the same context manager - Added a solution to prevent possible large snippets created by the
render_genericfunction - Support Python 3.14
💫 New checkers
Pylint checkers v4.0:
break-in-finally
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.
Custom checkers:
unnecessary-f-string: Added new checker that checks f-string to see if it only consists of a single bare format expression that can be replaced with the string representation of that expressionsimplifiable-if: Added a new checker that checks if aniforelifbranch only contains a single nestedifstatement with a single branch.
🐛 Bug fixes
- Fixed issue that caused PEP8 errors E301, E302, E303, E304, E305 and E306 to not render properly
🔧 Internal changes
- Added tests for node_printers.py functions rendering the PEP8 error messages: E101, E116, E124, E128, E201, E202
- Added tests for node_printers.py functions rendering the following PEP8 error codes: E221, E251, E261, E272, E273, E302, E305, E306
- Refactored node_printers.py by grouping repeated code in helper functions and grouping identical functions into a single functions to reduce code duplication
- Updated GitHub Actions workflow to Node 24
- Refactored custom renderers to accept
configparameter to stay consistent with the added parameter forrender-message - Refactored
setendings.pyto rely primarily on Astroid/Python’s built-in end-location attributes, reducing the amount of custom parsing logic - Fixed
test_html_server.pytests to be compatible with Windows - Updated
conftest.pyandtest_black.pyto be compatible with pytest v9, removing usage of some deprecated features. - Updated tests in
test_accumulation_table.pyto cover multi-loop behavior and added new cases - Updated to pylint v4.0 and astroid v4.0