Release Notes
Preview features
- [
flake8-type-checking
,pyupgrade
,ruff
] Addfrom __future__ import annotations
when it would allow new fixes (TC001
,TC002
,TC003
,UP037
,RUF013
) (#19100) - [
flake8-use-pathlib
] Add autofix forPTH109
(#19245) - [
pylint
] Detect indirectpathlib.Path
usages forunspecified-encoding
(PLW1514
) (#19304)
Bug fixes
- [
flake8-bugbear
] FixB017
false negatives for keyword exception arguments (#19217) - [
flake8-use-pathlib
] Fix false negative on directPath()
instantiation (PTH210
) (#19388) - [
flake8-django
] FixDJ008
false positive for abstract models with type-annotatedabstract
field (#19221) - [
isort
] FixI002
import insertion after docstring with multiple string statements (#19222) - [
isort
] Treat form feed as valid whitespace before a semicolon (#19343) - [
pydoclint
] FixSyntaxError
from fixes with line continuations (D201
,D202
) (#19246) - [
refurb
]FURB164
fix should validate arguments and should usually be marked unsafe (#19136)
Rule changes
- [
flake8-use-pathlib
] Skip single dots forinvalid-pathlib-with-suffix
(PTH210
) on versions >= 3.14 (#19331) - [
pep8_naming
] Avoid false positives on standard library functions with uppercase names (N802
) (#18907) - [
pycodestyle
] Handle brace escapes for t-strings in logical lines (#19358) - [
pylint
] Extend invalid string character rules to include t-strings (#19355) - [
ruff
] Allowstrict
kwarg when checking forstarmap-zip
(RUF058
) in Python 3.14+ (#19333)
Documentation
- [
flake8-type-checking
] MakeTC010
docs example more realistic (#19356) - Make more documentation examples error out-of-the-box (#[19288](https://github.com/astral-sh/ruff/pull/19288),[#19272](https://github.com/astral-sh/ruff/pull/19272),[#19291](https://github.com/astral-sh/ruff/pull/19291),[#19296](https://github.com/astral-sh/ruff/pull/19296),[#19292](https://github.com/astral-sh/ruff/pull/19292),[#19295](https://github.com/astral-sh/ruff/pull/19295),[#19297](https://github.com/astral-sh/ruff/pull/19297),[#19309](https://github.com/19288,#19272,#19291,#19296,#19292,#19295,#19297,/issues/19309))
Contributors
- @AlexWaygood
- @BurntSushi
- @Gankra
- @MatthewMckee4
- @MeGaGiGaGon
- @MichaReiser
- @UnboundVariable
- @chirizxc
- @close2code-palm
- @corneliusroemer
- @danparizher
- @dcreager
- @dhruvmanila
- @dylwil3
- @github-actions
- @ntBre
- @oconnor663
- @renovate
- @sharkdp
- @soundsonacid
- @w0nder1ng
- @zanieb
Install ruff 0.12.4
Install prebuilt binaries via shell script
:::sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.12.4/ruff-installer.sh | sh
Install prebuilt binaries via powershell script
:::sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ruff/releases/download/0.12.4/ruff-installer.ps1 | iex"