Releases: astral-sh/ruff
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>0.15.8
Release Notes
Released on 2026-03-26.
Preview features
- [
ruff] New ruleunnecessary-if(RUF050) (#24114) - [
ruff] New ruleuseless-finally(RUF072) (#24165) - [
ruff] New rulef-string-percent-format(RUF073): warn when using%operator on an f-string (#24162) - [
pyflakes] Recognizefrozendictas a builtin for Python 3.15+ (#24100)
Bug fixes
- [
flake8-async] Use fully-qualifiedanyio.lowlevelimport in autofix (ASYNC115) (#24166) - [
flake8-bandit] Check tuple arguments for partial paths inS607(#24080) - [
pyflakes] Skipundefined-name(F821) for conditionally deleted variables (#24088) E501/W505/formatter: Exclude nested pragma comments from line width calculation (#24071)- Fix
%foo?parsing in IPython assignment expressions (#24152) analyze graph: resolve string imports that reference attributes, not just modules (#24058)
Rule changes
- [
eradicate] ignorety: ignorecomments inERA001(#24192) - [
flake8-bandit] Treatsys.executableas trusted input inS603(#24106) - [
flake8-self] RecognizeSelfannotation andselfassignment inSLF001(#24144) - [
pyflakes]F507: Fix false negative for non-tuple RHS in%-formatting (#24142) - [
refurb] Parenthesize generator arguments inFURB142fixer (#24200)
Performance
- Speed up diagnostic rendering (#24146)
Server
- Warn when Markdown files are skipped due to preview being disabled (#24150)
Documentation
- Clarify
extend-ignoreandextend-selectsettings documentation (#24064) - Mention AI policy in PR template (#24198)
Other changes
- Use trusted publishing for NPM packages (#24171)
Contributors
- @bitloi
- @Sim-hu
- @mvanhorn
- @chinar-amrutkar
- @markjm
- @RenzoMXD
- @vivekkhimani
- @seroperson
- @moktamd
- @charliermarsh
- @ntBre
- @zanieb
- @dylwil3
- @MichaReiser
Install ruff 0.15.8
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.8/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.8/ruff-installer.ps1 | iex"Download ruff 0.15.8
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.7
Release Notes
Released on 2026-03-19.
Preview features
Rule changes
- [
pycodestyle] Recognizepyrefly:as a pragma comment (E501) (#24019)
Server
- Don't return code actions for non-Python documents (#23905)
Documentation
- Add company AI policy to contributing guide (#24021)
- Document editor features for Markdown code formatting (#23924)
- [
pylint] Improve phrasing (PLC0208) (#24033)
Other changes
- Use PEP 639 license information (#19661)
Contributors
Install ruff 0.15.7
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.7/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.7/ruff-installer.ps1 | iex"Download ruff 0.15.7
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>