What's Changed
Configuration
- Allow users to extend the set of included files via
include
by @charliermarsh in #3914 - Implement isort custom sections and ordering (#2419) by @hackedd in #3900
Rules
- [
flake8-simplify
] Add autofix forcontextlib.suppress
(SIM105
) by @leiserfg in #3915 - [
flake8-bandit
] Ignore assert errors (S101) inTYPE_CHECKING
blocks by @charliermarsh in #3960 - [
flake8-comprehensions
] Implementunnecessary-literal-within-dict-call
(C418
) by @charliermarsh in #3969 - [
ruff
] Add checks for mutable defaultsdataclass
es by @mosauter in #3877 - [
flake8-import-conventions
] Add a rule forBannedImportAlias
by @stancld in #3926 - [
flake8-pyi
] Implement duplicate types in unions (PYI016
) by @USER-5 in #3922 - [
flake8-bandit
] Implement flake8-bandit shell injection rules by @robyoung in #3924 - [
flake8-comprehensions
] RedirectPIE802
toC419
by @charliermarsh in #3971
Bug Fixes
- Fix unicode handling in PLE2515 by @konstin in #3898
- Avoid adding required imports to stub files by @charliermarsh in #3940
- Add 'or if cond' to
E712
message by @charliermarsh in #3962 - Ignore argument assignments when enforcing
RET504
by @charliermarsh in #4004 - Fix (doc-)line-too-long start location by @MichaReiser in #4006
- Ignore stub file assignments to value-requiring targets by @charliermarsh in #4030
- Allow legacy C and T selectors in JSON schema by @charliermarsh in #3889
- Ignore
PLW2901
when using typing cast by @dhruvmanila in #3891 - Visit comprehension to detect group name usage/overrides by @dhruvmanila in #3887
- Ensure that tab characters aren't in multi-line strings before throwing a violation by @evanrittenhouse in #3837
- Avoid N802 violations for
@override
methods by @charliermarsh in #3912 - Check for arguments in inner/outer call for
C414
by @dhruvmanila in #3916 - Do not skip analysis if
*args
present forF523
by @dhruvmanila in #3923 - Extend SIM105 to match also 'Ellipsis only' bodies in exception handlers by @leiserfg in #3925
- Support
pyright: ignore
comments by @charliermarsh in #3941 - Tidy up some
pygrep-hooks
rules by @charliermarsh in #3942 - Use identifier range for pytest rules by @charliermarsh in #3948
- Allow
typing_extensions.TypeVar
assignments in.pyi
files by @charliermarsh in #3951 - Raise percent-format upgrade rule (
UP031
) for hanging modulos by @charliermarsh in #3953 - Check for parenthesis in implicit str concat in
PT006
by @dhruvmanila in #3955 - Do not consider nested comment as part of code by @dhruvmanila in #3984
- Preserve type annotations when fixing
E731
by @dhruvmanila in #3983 - Remove autofix behavior for uncapitalized-environment-variables (
SIM112
) by @charliermarsh in #3988 - Respect typing-modules when evaluating no-return functions by @charliermarsh in #4001
- Avoid short-circuiting when detecting RET rules by @charliermarsh in #4002
- Set non-empty range for indentation diagnostics by @MichaReiser in #4005
- Ignore relative imports in
banned-api
rules by @charliermarsh in #4024 - Support relative imports in
banned-api
enforcement by @charliermarsh in #4025 - Treat non-future function annotations as required-at-runtime by @charliermarsh in #4028
- Ignore certain flake8-pyi errors within function bodies by @charliermarsh in #4029
New Contributors
- @tjkuson made their first contribution in #3886
- @mosauter made their first contribution in #3877
- @stancld made their first contribution in #3926
- @USER-5 made their first contribution in #3922
- @robyoung made their first contribution in #3924
- @hackedd made their first contribution in #3900
- @justinchuby made their first contribution in #3982
- @mirecl made their first contribution in #4008
- @Xemnas0 made their first contribution in #4026
Full Changelog: v0.0.261...v0.0.262