pypi flake8-annotations 2.0.1
Release v2.0.1

latest releases: 3.0.1, 3.0.0, 2.9.1...
4 years ago

v2.0.1

Added

  • #71 Add pep8-naming to linting toolchain
  • Expand pre-commit hooks
    • Add black
    • Add check-merge-conflict
    • Add check-toml
    • Add check-yaml
    • Add end-of-file-fixer
    • Add mixed-line-ending
    • Add python-check-blanket-noqa

Changed

  • Add argument names to Argument and Function __repr__ methods to make the string more helpful to read

Fixed

  • #70 Fix incorrect column index for missing return annotations when other annotations are present on the same line of source
  • #69 Fix misclassification of None returning functions when they contained nested functions with non-None returns (thanks @isidentical!)
  • #67 Fix methods of nested classes being improperly classified as "regular" functions (thanks @isidentical!)

Additional Details

The previous approach being taken for nesting as to use a generic_visit() on the node to visit any nested functions. However, from the bugs reported (#67, #69) it was made clear that this approach was too generic & a method for either restricting or keeping track of the depth of this generic visit was required.

Both the FunctionVisitor and ReturnVisitor classes have been rearchitected to keep track of the parent context of the nodes being visited in order to properly classify methods of nested classes and return values of nested functions, respectively.

You can view a full writeup here on discuss.python.org.

Don't miss a new flake8-annotations release

NewReleases is sending notifications on new releases.