Python-ta

Latest version: v2.8.1

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

3.1

- `use-yield-from`
- `deprecated-attribute`

For more information on these checkers, please see the
[Pylint release notes](http://pylint.pycqa.org/en/latest/whatsnew/index.html). Note that the above
list only contains the Pylint checkers enabled by default in PythonTA.

Custom checkers:

- `inconsistent-returns` and `missing-return-statement`: Provide clearer error messages when reporting missing return statements. This replaces pylint's [R1710](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/inconsistent-return-statements.html) check.

🐛 Bug fixes

- Fixed issue with error message of C0410 by reformating it to properly fit with the list of modules imported that are provided to it
- Fixed bug where `_` was marked as a built-in when running PythonTA after running doctest
- Fixed issue where annotated constant variable assignment was not considered as permissible top level code and triggered error E9992
- Fixed issue where top level class attribute assignment was considered as permissible top level code
- Fixed issue where `check_contracts` fails silently when function preconditions contain precondition violations, and when a representation invariant contains a call to a top-level function (not built-in or imported library).
- Fixed issue where methods called in representation invariants lead to infinite recursion.
- Fixed issue where `PossiblyUndefinedChecker` raised an error if the control flow graph was invalid due to syntax error

🔧 Internal changes

- Updated changelog and pull request template formats
- Added unit tests for PEP8 errors E115, E122, E125, E127, E129, E131 for `PycodestyleChecker`
- Added unit tests for PEP8 errors E223, E224, E227, E228, E265 for `PycodestyleChecker`
- Refactored `test_check_on_dir` in `test_check.py` module to test on `sample_dir`, a subset of `examples`
- Added unit test `test_examples_files_pyta` in `test_examples.py` to check every file in `examples` with PythonTA
- Added unit tests for PEP8 errors E266, E275, E301, E303, E304 for `PycodestyleChecker`
- Moved tests related to `__main__.py` from `test_check.py` to `test_main.py`
- Added more unit tests to `test_main.py` to increase coverage of `__main__.py` to 100%
- Updated `README.md` to reflect updated folder structure
- Added unit test `test_pycodestyle_errors_pyta` in `test_examples.py` to check every file in `e9989_pycodestyle` with PythonTA for PEP8 errors
- Parametrized tests for `PycodestyleChecker`
- Moved tests related to `snapshot.py` out of `test_accumulation_table.py` and into new module `test_snapshot.py`
- Updated GitHub Action tests to avoid running `test_accumulation_table.py` and `test_recursion_table.py` with coverage and add verbose output for debug testing
- Allowed GitHub Action tests to run on _all_ pull requests, including drafts
- Updated dependencies for GitHub Actions to use the latest versions
- Updated dependabot configuration to auto-update dependencies for GitHub Actions in the future
- Updated usage messages in `examples/sample_usage/` of `draw_cfg.py` and `print_ast.py` to be accurate on all operating systems
- Removed redundant line from `tests/test_examples.py`
- Fixed minor typo in an error message in `python_ta/cfg/visitor.py`
- Updated `ExprWrapper` to support `set/list/tuple` literals and `in/not in` operators
- Updated `snapshot.py` and `test_snapshot.py` to align with MemoryViz 0.2.0 updates
- Updated `ExprWrapper` to support string variables and `==`, `in/not in`, indexing and slicing operators
- Added protected `_z3_vars` attribute to `ControlFlowGraph` to store variables to be used in Z3 solver
- Removed unused imports from `python_ta/cfg/graph.py`
- Extended functionality of `ExprWrapper` class to include function definitions' arguments and name assignments
- Added `z3` to dependencies installed as part of the `docs` job in the GitHub Actions workflow
- Added tests to maintain/increase coverage of `visitor.py`, `graph.py`, and `ExprWrapper.py`
- Removed deprecated and redundant `future` argument from `node.frame()` call in `invalid_name_checker.py`
- Updated pylint to v3.2.6 and astroid to v3.2.4 (no new checks were enabled by default)
- Excluded `node_modules/` folder from package autodiscovery
- Updated `graph.py` to augment control flow graph edges with z3 constraints
- Added support for the `!=` operator and replaced dictionary indexing with `.get` in `ExprWrapper`.
- Refactored `Z3Visitor` to use `safe_infer()` instead of `inferred()` and added handling of `AstroidError`.
- Add `negate` attribute to `CFGEdge`

3.0

- `invalid-field-call`
- `return-in-finally`
- `kwarg-superseded-by-positional-arg`
- `unnecessary-negation` (renamed from `unneeded-not`)

For more information on these checkers, please see the
[Pylint release notes](http://pylint.pycqa.org/en/latest/whatsnew/index.html). Note that the above
list only contains the Pylint checkers enabled by default in PythonTA.

🔧 Internal changes

- Remove experimental type inference code.

2.17

- `bad-chained-comparison`

For more information on these checkers, please see the
[Pylint release notes](http://pylint.pycqa.org/en/latest/whatsnew/index.html). Note that the above
list only contains the Pylint checkers enabled by default in PythonTA.

2.16

- `pointless-exception-statement`
- `shadowed-import`
- `unbalanced-dict-unpacking`
- `nested-min-max`
- `invalid-slice-step`

2.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](http://pylint.pycqa.org/en/latest/whatsnew/index.html). Note that the above
list only contains the Pylint checkers enabled by default in PythonTA.

2.13

- `modified-iterating-list`
- `modified-iterating-dict`
- `modified-iterating-set`
- `unnecessary-ellipsis`
- `bad-file-encoding`

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.