Changes
Preview features
- Implement multiline dictionary and list hugging for preview style (#8293)
- Implement the
fix_power_op_line_length
preview style (#8947) - Use Python version to determine typing rewrite safety (#8919)
- [
flake8-annotations
] Enable auto-return-type involvingOptional
andUnion
annotations (#8885) - [
flake8-bandit
] Implementdjango-raw-sql
(S611
) (#8651) - [
flake8-bandit
] Implementtarfile-unsafe-members
(S202
) (#8829) - [
flake8-pyi
] Implement fix forunnecessary-literal-union
(PYI030
) (#7934) - [
flake8-simplify
] Extenddict-get-with-none-default
(SIM910
) to non-literals (#8762) - [
pylint
] - addunnecessary-list-index-lookup
(PLR1736
) + autofix (#7999) - [
pylint
] - implement R0202 and R0203 with autofixes (#8335) - [
pylint
] Implementrepeated-keyword
(PLE1132
) (#8706) - [
pylint
] Implementtoo-many-positional
(PLR0917
) (#8995) - [
pylint
] Implementunnecessary-dict-index-lookup
(PLR1733
) (#8036) - [
refurb
] Implementredundant-log-base
(FURB163
) (#8842)
Rule changes
- [
flake8-boolean-trap
] Allow booleans in@override
methods (#8882) - [
flake8-bugbear
] AvoidB015
,B018
for last expression in a cell (#8815) - [
flake8-pie
] Allow ellipses for enum values in stub files (#8825) - [
flake8-pyi
] Check PEP 695 type aliases forsnake-case-type-alias
andt-suffixed-type-alias
(#8966) - [
flake8-pyi
] Check for kwarg and varargNoReturn
type annotations (#8948) - [
flake8-simplify
] Omit select context managers fromSIM117
(#8801) - [
pep8-naming
] Allow Django model loads innon-lowercase-variable-in-function
(N806
) (#8917) - [
pycodestyle
] AvoidE703
for last expression in a cell (#8821) - [
pycodestyle
] UpdateE402
to work at cell level for notebooks (#8872) - [
pydocstyle
] AvoidD100
for Jupyter Notebooks (#8816) - [
pylint
] Implement fix forunspecified-encoding
(PLW1514
) (#8928)
Formatter
- Avoid unstable formatting in ellipsis-only body with trailing comment (#8984)
- Inline trailing comments for type alias similar to assignments (#8941)
- Insert trailing comma when function breaks with single argument (#8921)
CLI
- Update
ruff check
andruff format
to default to the current directory (#8791) - Stop at the first resolved parent configuration (#8864)
Configuration
- [
pylint
] Defaultmax-positional-args
tomax-args
(#8998) - [
pylint
] Addallow-dunder-method-names
setting forbad-dunder-method-name
(PLW3201
) (#8812) - [
isort
] Add support forfrom-first
setting (#8663) - [
isort
] Add support forlength-sort
settings (#8841)
Bug fixes
- Add support for
@functools.singledispatch
(#8934) - Avoid off-by-one error in stripping noqa following multi-byte char (#8979)
- Avoid off-by-one error in with-item named expressions (#8915)
- Avoid syntax error via invalid ur string prefix (#8971)
- Avoid underflow in
get_model
matching (#8965) - Avoid unnecessary index diagnostics when value is modified (#8970)
- Convert over-indentation rule to use number of characters (#8983)
- Detect implicit returns in auto-return-types (#8952)
- Fix start >= end error in over-indentation (#8982)
- Ignore
@overload
and@override
methods for too-many-arguments checks (#8954) - Lexer start of line is false only for
Mode::Expression
(#8880) - Mark
pydantic_settings.BaseSettings
as having default copy semantics (#8793) - Respect dictionary unpacking in
NamedTuple
assignments (#8810) - Respect local subclasses in
flake8-type-checking
(#8768) - Support type alias statements in simple statement positions (#8916)
- [
flake8-annotations
] Avoid filtering out un-representable types in return annotation (#8881) - [
flake8-pie
] Retain extra ellipses in protocols and abstract methods (#8769) - [
flake8-pyi
] Respect local enum subclasses insimple-defaults
(PYI052
) (#8767) - [
flake8-trio
] Use correct range forTRIO115
fix (#8933) - [
flake8-trio
] Use full arguments range for zero-sleep-call (#8936) - [
isort
] fix: mark__main__
as first-party import (#8805) - [
pep8-naming
] AvoidN806
errors for type alias statements (#8785) - [
perflint
] AvoidPERF101
if there's an append in loop body (#8809) - [
pycodestyle
] Allow space-before-colon after end-of-slice (#8838) - [
pydocstyle
] Avoid non-character breaks inover-indentation
(D208
) (#8866) - [
pydocstyle
] Ignore underlines when determining docstring logical lines (#8929) - [
pylint
] Extendself-assigning-variable
to multi-target assignments (#8839) - [
tryceratops
] Avoid repeated triggers in nestedtryceratops
diagnostics (#8772)
Documentation
- Add advice for fixing RUF008 when mutability is not desired (#8853)
- Added the command to run ruff using pkgx to the installation.md (#8955)
- Document fix safety for flake8-comprehensions and some pyupgrade rules (#8918)
- Fix doc formatting for zero-sleep-call (#8937)
- Remove duplicate imports from os-stat documentation (#8930)
- Replace generated reference to MkDocs (#8806)
- Update Arch Linux package URL in installation.md (#8802)
- [
flake8-pyi
] Fix error int-suffixed-type-alias
(PYI043
) example (#8963) - [
flake8-pyi
] Improve motivation forcustom-type-var-return-type
(PYI019
) (#8766)