pypi flake8-pyi 23.1.0

latest releases: 24.9.0, 24.6.0, 24.4.1...
20 months ago

Bugfixes:

  • Do not emit Y020 (quoted annotations) for strings in parameter defaults.
  • Fix checking of defaults for functions with positional-only parameters.

Other changes:

  • Modify Y036 so that _typeshed.Unused is allowed as an annotation for parameters in __(a)exit__ methods. Contributed by Avasam
  • Several changes have been made to error codes relating to imports:
    • The Y027 error code has been removed.
    • All errors that used to result in Y027 being emitted now result in Y022 being emitted instead.
    • Some errors that used to result in Y023 being emitted now result in Y022 being emitted instead.
    • typing.Match and typing.Pattern have been added to the list of imports banned by Y022. Use re.Match and re.Pattern instead.
  • flake8-pyi no longer supports stub files that aim to support Python 2. If your stubs need to support Python 2, pin flake8-pyi to 22.11.0 or lower.
  • Y011, Y014 and Y015 have all been significantly relaxed. None, bools, ints, floats, complex numbers, strings and bytes are all now allowed as default values for parameter annotations or assignments.
  • Hatchling is now used as the build backend. This should have minimal, if any, user-facing impact.

Don't miss a new flake8-pyi release

NewReleases is sending notifications on new releases.