Skip to content

[2.12.0] 2025-12-08

Choose a tag to compare

@david-yz-liu david-yz-liu released this 08 Dec 18:45

✨ Enhancements

  • Updated SnapshotTracer to 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-long to improve its error snippet to highlight the overflow segment instead of the entire line.
  • Improved error message for error C0305 trailing-newlines and 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 NameError is raised and the missing name matches an instance attribute, and is due to an omitted self. in the RI.
  • Extended AccumulationTable class to support multiple loops in sequence within the same context manager
  • Added a solution to prevent possible large snippets created by the render_generic function
  • 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 expression
  • simplifiable-if: Added a new checker that checks if an if or elif branch only contains a single nested if statement 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 config parameter to stay consistent with the added parameter for render-message
  • Refactored setendings.py to rely primarily on Astroid/Python’s built-in end-location attributes, reducing the amount of custom parsing logic
  • Fixed test_html_server.py tests to be compatible with Windows
  • Updated conftest.py and test_black.py to be compatible with pytest v9, removing usage of some deprecated features.
  • Updated tests in test_accumulation_table.py to cover multi-loop behavior and added new cases
  • Updated to pylint v4.0 and astroid v4.0