Repository navigation
23.1.0
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.Unusedis 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.Matchandtyping.Patternhave been added to the list of imports banned by Y022. Usere.Matchandre.Patterninstead.
- 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,complexnumbers, strings andbytesare 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.