Releases: astral-sh/ruff
0.15.18
Release Notes
Released on 2026-06-18.
Preview features
- Handle nested
ruff:ignorecomments (#25791) - Stop displaying severity in output (#26050)
- Use human-readable names in CLI output (#25937)
- Use human-readable names in LSP and playground diagnostics (#26058)
- [
pydocstyle] Prevent property docstrings starting with verbs (D421) (#23775) - [
flake8-pyi] ExtendPYI033to Python files (#26129)
Bug fixes
- Detect equivalent numeric mapping keys (#26009)
- Detect mapping keys equivalent to booleans (#25982)
- Detect repeated signed and complex dictionary keys (#26007)
Rule changes
- [
flake8-pyi] RenamePYI033tolegacy-type-comment(#26131)
Performance
- Use
ThinVecfor call keywords (#25999) - Inline parser recovery context checks (#26038)
- Match parser keywords as bytes (#26037)
- Move value parsing out of lexing (#25360)
Server
- Render subdiagnostics and secondary annotations as related information (#26011)
Documentation
- Update fix availability for always-fixable rules (#26091)
- [
flake8-tidy-imports] Add fix safety section (TID252) (#17491)
Parser
- Reject
__debug__lambda parameters (#26022) - Reject
_as a match-pattern target (#25977) - Reject multiple starred names in sequence patterns (#25976)
- Reject parenthesized star imports (#26021)
- Reject starred comprehension targets (#26023)
- Reject unparenthesized generator expressions in class bases (#25978)
- Reject
yieldexpressions after commas (#26024) - Validate function type parameter default order (#25981)
Playground
Contributors
Install ruff 0.15.18
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.18/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.18/ruff-installer.ps1 | iex"Download ruff 0.15.18
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.17
Release Notes
Released on 2026-06-11.
Preview features
- Allow human-readable names in suppression comments (#25614)
- Fix handling of
ignorecomments within adisable/enablepair (#25845) - Prioritize human-readable names in CLI output (#25869)
- Respect diagnostic start and parent ranges and trailing comments in
ruff:ignoresuppressions (#25673) - [
flake8-async] Addtrio.as_safe_channelto safe decorators (ASYNC119) (#25775) - [
flake8-pytest-style] Also checkpytest_asynciofixtures (#25375) - [
ruff] Banpytestautouse fixtures (RUF076) (#25477) - [
pyupgrade] Addfrom __future__ import annotationsautomatically (UP007,UP045) (#23259)
Bug fixes
- Fix diagnostic when
ruff:enableorruff:disableappears whereruff:ignoreis expected (#25700) - [
pyupgrade] Preserve leading empty literals to avoid syntax errors (UP032) (#25491)
Rule changes
- [
flake8-pytest-style] Clarify diagnostic message for single parameters (PT007) (#25592) - [
numpy] Drop autofix fornp.in1d(NPY201) (#25612) - [
pylint] Exempt Python version comparisons (PLR2004) (#25743)
Performance
- Reserve AST
Vecs with correct capacity for common cases (#25451)
Formatter
- Preserve whitespace for Quarto cell option comments (#25641)
CLI
- Allow rule names in
ruff rule(#25640)
Other changes
- Fix playground diagnostics scrollbars (#25642)
Contributors
- @SuryanshSS1011
- @anishgirianish
- @romero-deshaw
- @karlhillx
- @carljm
- @ntBre
- @11happy
- @Kilo59
- @oconnor663
- @LeonidasZhak
- @DavisVaughan
- @MeGaGiGaGon
- @jonathandung
- @MichaReiser
- @brianmego
Install ruff 0.15.17
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.17/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.17/ruff-installer.ps1 | iex"Download ruff 0.15.17
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.16
Release Notes
Released on 2026-06-04.
Preview features
- [
flake8-async] Implementyield-in-context-manager-in-async-generator(ASYNC119) (#24644) - [
pylint] Narrow diagnostic range and exclude cases without exception handlers (PLW0717) (#25440) - [
ruff] Treatyieldbeforebreakfrom a terminal loop as terminal (RUF075) (#25447)
Bug fixes
- [
eradicate] Avoid flaggingruff:ignorecomments as code (ERA001) (#25537) - [
eradicate] FixERA001/RUF100conflict whennoqais on commented-out code (#25414) - [
pyflakes] Avoid removing theformatcall when it would change behavior (F523) (#25320) - [
pylint] Avoid syntax errors in invalid character replacements in f-strings before Python 3.12 (PLE2510,PLE2512,PLE2513,PLE2514,PLE2515) (#25544) - [
pyupgrade] Avoid convertingformatcalls with more kinds of side effects (UP032) (#25484)
Rule changes
- [
flake8-pytest-style] Avoid fixes for ambiguousargnamesandargvaluescombinations (PT006) (#24776)
Performance
- Drop excess capacity from statement suites during parsing (#25368)
Documentation
- [
pydocstyle] Improve discoverability of rules enabled for each convention (#24973) - [
ruff] Restore example code for Python versions before 3.15 (RUF017) (#25439) - Fix typo
bin/active→bin/activatein tutorial (#25473)
Other changes
- Shrink additional parser AST collections (#25465)
Contributors
- @Redslayer112
- @koriyoshi2041
- @George-Ogden
- @TejasAmle
- @anishgirianish
- @ntBre
- @MichaReiser
- @loganrosen
- @RafaelJohn9
- @adityasingh2400
Install ruff 0.15.16
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.16/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.16/ruff-installer.ps1 | iex"Download ruff 0.15.16
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.15
Release Notes
Released on 2026-05-28.
Preview features
- Fix Markdown closing fence handling (#25310)
- [
pyflakes] Report duplicate imports intyping.TYPE_CHECKINGblock (F811) (#22560)
Bug fixes
- [
pyflakes] Treat function-scope bare annotations as locals per PEP 526 (F821) (#21540)
Performance
- Avoid redundant
TokenValuedrops in the lexer (#25300) - Reduce memory usage by dropping token-excess capacity and improve performance by approximating the initial tokens
Vecsize (#25354) - Use
ThinVecin AST to shrinkStmt(#25361)
Documentation
- Fix
line-lengthexample for--configoption (#25389) - [
flake8-comprehensions] DocumentRecursionErroredge case in__len__(C416) (#25286) - [
mccabe] Improve example (C901) (#25287) - [
pyupgrade] Clarify fix safety docs (UP007,UP045) (#25288) - [
refurb] DocumentFURB192exception change for empty sequences (#25317) - [
ruff] Document false negative for user-defined types (RUF013) (#25289)
Formatter
- Fix formatting of lambdas nested within f-strings (#25398)
Server
- Return code action for
codeAction/resolverequests that contain no or no valid URL (#25365)
Other changes
- Expand semantic syntax errors for invalid walruses (#25415)
Contributors
- @chirizxc
- @ntBre
- @adityasingh2400
- @charliermarsh
- @fallintoplace
- @martin-schlossarek
- @MichaReiser
- @Ruchir28
Install ruff 0.15.15
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.15/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.15/ruff-installer.ps1 | iex"Download ruff 0.15.15
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.14
Release Notes
Released on 2026-05-21.
Preview features
- [
airflow] Implementairflow-task-implicit-multiple-outputs(AIR202) (#25152) - [
flake8-use-pathlib] MarkPTH101fix as unsafe when first argument is a class attribute annotated asint(#25086) - [
pylint] Implementtoo-many-try-statements(W0717) (#23970) - [
ruff] Addincorrect-decorator-order(RUF074) (#23461) - [
ruff] Addfallible-context-manager(RUF075) (#22844)
Bug fixes
- Fix lambda formatting in interpolated string expressions (#25144)
- Treat generic
frozensetannotations as immutable (#25251) - [
flake8-type-checking] Avoidstrictbehavior whenfuture-annotationsare enabled (TC001,TC002,TC003) (#25035) - [
pylint] Avoid false positives inelseclause (PLR1733) (#25177)
Rule changes
- [
flake8-comprehensions] SkipC417for lambdas with positional-only parameters (#25272) - [
flake8-simplify] Preserve f-string source verbatim inSIM101fix (#25061)
Performance
- Avoid unnecessary parser lookahead for operators (#25290)
Documentation
- Update code example setting Neovim LSP log level (#25284)
Other changes
- Add full PEP 798 support (#25104)
- Add a parser recursion limit (#24810)
- Update various
ruff_python_stdlibAPIs (#25273)
Contributors
- @ocaballeror
- @lerebear
- @samuelcolvin
- @baltasarblanco
- @aconal-com
- @anishgirianish
- @JelleZijlstra
- @AlexWaygood
- @ntBre
- @adityasingh2400
- @charliermarsh
- @Dev-iL
- @neutrinoceros
- @shivamtiwari3
- @Dev-X25874
Install ruff 0.15.14
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.14/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.14/ruff-installer.ps1 | iex"Download ruff 0.15.14
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.13
Release Notes
Released on 2026-05-14.
Preview features
- Add a rule to flag lazy imports that are eagerly evaluated (#25016)
- [
pylint] Standardize diagnostic message (PLR0914,PLR0917) (#24996)
Bug fixes
- Fix
F811false positive for class methods (#24933) - Fix setting selection for multi-folder workspace (#24819)
- [
eradicate] Fix false positive for lines with leading whitespace (ERA001) (#25122) - [
flake8-pyi] Fix false positive for f-string debug specifier (PYI016) (#24098)
Rule changes
- Always include panic payload in panic diagnostic message (#24873)
- Restrict
PYI034for in-place operations to enclosing class (#24511) - Improve error message for parameters that are declared
global(#24902) - Update known stdlib (#25103)
Performance
- [
isort] Avoid constructingglob::Patterns for literal known modules (#25123)
CLI
Configuration
- Increase max allowed value of
line-lengthsetting (#24962)
Documentation
- Add
D203to rules that conflict with the formatter (#25044) - Clarify
COM819and formatter interaction (#25045) - Clarify that
NotImplementedis a value, not an exception (F901) (#25054) - Update number of lint rules supported (#24942)
Other changes
- Simplify the playground's markdown template (#24924)
Contributors
- @MichaReiser
- @brian-c11
- @Andrej730
- @denyszhak
- @darestack
- @sharkdp
- @charliermarsh
- @EkriirkE
- @eyupcanakman
- @Hrk84ya
- @thernstig
- @ntBre
Install ruff 0.15.13
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.13/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.13/ruff-installer.ps1 | iex"Download ruff 0.15.13
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.12
Release Notes
Released on 2026-04-24.
Preview features
- Implement
#ruff:file-ignorefile-level suppressions (#23599) - Implement
#ruff:ignorelogical-line suppressions (#23404) - Revert preview changes to displayed diagnostic severity in LSP (#24789)
- [
airflow] Implementtask-branch-as-short-circuit(AIR004) (#23579) - [
flake8-bugbear] Fixbreak/continuehandling inloop-iterator-mutation(B909) (#24440) - [
pylint] FixPLC2701for type parameter scopes (#24576)
Rule changes
- [
pandas-vet] Suggest.arrayas well inPD011(#24805)
CLI
- Respect default Unix permissions for cache files (#24794)
Documentation
- [
pylint] FixPLR0124description not to claim self-comparison always returns the same value (#24749) - [
pyupgrade] Expand docs on reusableTypeVars and scoping (UP046) (#24153) - Improve rules table accessibility (#24711)
Contributors
- @dylwil3
- @AlexWaygood
- @woodruffw
- @avasis-ai
- @Dev-iL
- @denyszhak
- @ShipItAndPray
- @anishgirianish
- @augustelalande
- @amyreese
- @majiayu000
Install ruff 0.15.12
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.12/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.12/ruff-installer.ps1 | iex"Download ruff 0.15.12
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.11
Release Notes
Released on 2026-04-16.
Preview features
- [
ruff] IgnoreRUF029when function is decorated withasynccontextmanager(#24642) - [
airflow] Implementairflow-xcom-pull-in-template-string(AIR201) (#23583) - [
flake8-bandit] FixS103false positives and negatives in mask analysis (#24424)
Bug fixes
- [
flake8-async] Omit overridden methods forASYNC109(#24648)
Documentation
- [
flake8-async] Add override mention toASYNC109docs (#24666) - Update Neovim config examples to use
vim.lsp.config(#24577)
Contributors
Install ruff 0.15.11
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.11/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.11/ruff-installer.ps1 | iex"Download ruff 0.15.11
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.10
Release Notes
Released on 2026-04-09.
Preview features
- [
flake8-logging] Allow closures in except handlers (LOG004) (#24464) - [
flake8-self] MakeSLFdiagnostics robust to non-self-named variables (#24281) - [
flake8-simplify] Make the fix forcollapsible-ifsafe inpreview(SIM102) (#24371)
Bug fixes
- Avoid emitting multi-line f-string elements before Python 3.12 (#24377)
- Avoid syntax error from
E502fixes in f-strings and t-strings (#24410) - Strip form feeds from indent passed to
dedent_to(#24381) - [
pyupgrade] Fix panic caused by handling of octals (UP012) (#24390) - Reject multi-line f-string elements before Python 3.12 (#24355)
Rule changes
- [
ruff] Treat f-string interpolation as potential side effect (RUF019) (#24426)
Server
- Add support for custom file extensions (#24463)
Documentation
Contributors
Install ruff 0.15.10
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.10/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.10/ruff-installer.ps1 | iex"Download ruff 0.15.10
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.15.9
Release Notes
Released on 2026-04-02.
Preview features
- [
pyflakes] Flag annotated variable redeclarations asF811in preview mode (#24244) - [
ruff] Allow dunder-named assignments in non-strict mode forRUF067(#24089)
Bug fixes
- [
flake8-errmsg] Avoid shadowing existingmsgin fix forEM101(#24363) - [
flake8-simplify] Ignore pre-initialization references inSIM113(#24235) - [
pycodestyle] FixW391fixes for consecutive empty notebook cells (#24236) - [
pyupgrade] FixUP008nested class matching (#24273) - [
pyupgrade] Ignore strings with string-only escapes (UP012) (#16058) - [
ruff]RUF072: skip formfeeds on dedent (#24308) - [
ruff] Avoid re-using symbol inRUF024fix (#24316) - [
ruff] Parenthesize expression inRUF050fix (#24234) - Disallow starred expressions as values of starred expressions (#24280)
Rule changes
- [
flake8-simplify] SuppressSIM105forexcept*before Python 3.12 (#23869) - [
pyflakes] ExtendF507to flag%-format strings with zero placeholders (#24215) - [
pyupgrade]UP018should detect more unnecessarily wrapped literals (UP018) (#24093) - [
pyupgrade] FixUP008callable scope handling to support lambdas (#24274) - [
ruff]RUF010: Mark fix as unsafe when it deletes a comment (#24270)
Formatter
- Add
nested-string-quote-styleformatting option (#24312)
Documentation
- [
flake8-bugbear] Clarify RUF071 fix safety for non-path string comparisons (#24149) - [
flake8-type-checking] Clarify import cycle wording forTC001/TC002/TC003(#24322)
Other changes
- Avoid rendering fix lines with trailing whitespace after
|(#24343)
Contributors
- @charliermarsh
- @MichaReiser
- @tranhoangtu-it
- @dylwil3
- @zsol
- @renovate
- @bitloi
- @danparizher
- @chinar-amrutkar
- @second-ed
- @getehen
- @Redovo1
- @matthewlloyd
- @zanieb
- @InSyncWithFoo
- @RenzoMXD
Install ruff 0.15.9
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.9/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.9/ruff-installer.ps1 | iex"Download ruff 0.15.9
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruffYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>