What's Changed
Rules
- [
pyupgrade
] Replace tuples with type union in isinstance or issubclass calls by @martinlehoux in #3280 - [
flake8-pyi
] Add flake-pyi PYI033 "Do not use type comments in stubs" by @konstin in #3302 - [
flake8-pyi
] PYI006 bad version info comparison by @konstin in #3291 - [
pycodestyle
] feat(E251,E252): add rules by @carlosmiei in #3274 - [
pycodestyle
] feat(E211): add rule + autofix by @carlosmiei in #3313 - [
pycodestyle
] feat(e225,226,227,228): add rules by @carlosmiei in #3300 - [
pycodestyle
] feat(W191): add indentation_contains_tabs by @carlosmiei in #3249 - Redirect
RUF004
toB026
by @charliermarsh in #3293
CLI
- Add a
--ignore-noqa
CLI flag to force-ignore noqa directives by @charliermarsh in #3296
Settings
- Implement
property-decorators
configuration option for pydocstyle by @staticssleever668 in #3311 - Always include
@classmethod
and@staticmethod
in decorator lists by @charliermarsh in #3314 - Detect quote style ignoring docstrings by @bz2 in #3306
Bug Fixes
- Deduplicate SIM116 errors by @charliermarsh in #3260
- Don't flag keyword-based logging format strings by @charliermarsh in #3261
- Avoid raising TRY200 violations within new scopes by @charliermarsh in #3275
- Use expression span for yoda-conditions fixes by @charliermarsh in #3276
- Avoid PEP 585 rewrites when builtins are shadowed by @charliermarsh in #3286
- Ignore unused imports in ModuleNotFoundError blocks by @charliermarsh in #3288
- Treat function type annotations within classes as runtime-required by @charliermarsh in #3312
- Extend
RET503
autofixes to "end of statement", including comments by @charliermarsh in #3324 - Handle empty NamedTuple and TypedDict conversions by @charliermarsh in #3251
- Use
identifier_range
for a few more rules by @charliermarsh in #3254 - Match non-lowercase with S105 again by @scop in #3258
- Abort when unable to fix relative imports past module root by @charliermarsh in #3319
- Use presence of convention-specific sections during docstring inference by @charliermarsh in #3325
- Treat callables within type definitions as default-non-types by @charliermarsh in #3329
- Explicitly put
Path(...)
in Pathlib violations by @evanrittenhouse in #3333
New Contributors
- @rouge8 made their first contribution in #3277
- @staticssleever668 made their first contribution in #3311
- @bz2 made their first contribution in #3306
- @evanrittenhouse made their first contribution in #3333
Full Changelog: v0.0.253...v0.0.254