pypi flake8-pyi 22.2.0

latest releases: 24.6.0, 24.4.1, 24.4.0...
2 years ago

Bugfixes:

  • fix bugs in several error codes so that e.g. _T = typing.TypeVar("_T") is
    recognised as a TypeVar definition (previously only _T = TypeVar("_T") was
    recognised).
  • fix bug where foo = False at the module level did not trigger a Y015 error.
  • fix bug where TypeVars were erroneously flagged as unused if they were only used in
    a typing.Union subscript.
  • improve unclear error messages for Y022, Y023 and Y027 error codes.

Features:

  • introduce Y032 (prefer object to Any for the second argument in __eq__ and
    __ne__ methods).
  • introduce Y033 (always use annotations in stubs, rather than type comments).
  • introduce Y034 (detect common errors where return types are hardcoded, but they
    should use TypeVars instead).
  • introduce Y035 (__all__ in a stub has the same semantics as at runtime).

Don't miss a new flake8-pyi release

NewReleases is sending notifications on new releases.