PythonTA's adopting semantic versioning as of this release, so we've bumped the version to 2.0.
✨ Enhancements
- Added basic CLI. Users can now run PythonTA in the command line either as a standalone
script (`$ python_ta my_file`) or as a Python module (`$ python -m python_ta my_file`).
- Added new documentation website, hosted at <https://www.cs.toronto.edu/~david/pyta>.
- Added support for relative paths in `output` argument to `check_all`.
- Added new configuration option `pycodestyle-ignore` to customize the pycodestyle errors
checked by `pep8-errors`.
✨ Changes
- Changed HTML report template to make it more user-friendly.
- Changed default HTML report output: by default now loads in a web browser without creating
a temporary file (previously, `pyta_report.html`). This file can still be generated by passing
`output='pyta_report.html'` to calls to `check_all`.
- Added new `output-format` option to specify reporter class.
- Changed API of PythonTA custom reporters.
- Updated to Pylint v2.10. See "New checks" below for the new checks enabled by default.
- Renamed `for-target-subscript` checker to `invalid-for-target`, and added support checking for
loop targets that are attributes (e.g., `for obj.x in [1, 2, 3]`).
([701](https://github.com/pyta-uoft/pyta/issues/701))
🐛 Bug fixes
- Fixed bug with `python_ta.contracts`: do not check representation invariants
when a helper method is called within an initializer.
- Fixed bug with `python_ta.contracts`: do not check class representation invariants in the
initializer of a superclass.
- Fixed bug with `shadowing-in-comprehension` checker: do not treat `_` as a shadowed variable.
- Fixed bug with `unnecessary-indexing` checker: handle case where loop variable is first assigned
before the for loop.
([699](https://github.com/pyta-uoft/pyta/issues/699))
- Fixed bug where PythonTA would crash on files that used encodings other than UTF-8.
PythonTA now reports an error and displays the invalid characters to the user.
🚧 Deprecations
- Deprecated `pyta-reporter` option; use `output-format` instead.
💫 New checkers
Custom checkers:
- `missing-space-in-doctest`: Flag when a doctest prompt (`>>>`) is not followed by a space.
E.g., `>>>my_function(1)`.