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
andtyping.Pattern
have been added to the list of imports banned by Y022. Usere.Match
andre.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
,bool
s,int
s,float
s,complex
numbers, strings andbytes
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.