⬆️ [renovate] Update Python dependencies
This MR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| fastapi (changelog) | ==0.139.2 → ==0.140.0 |
||
| ruff (source, changelog) | ==0.15.0 → ==0.16.0 |
||
| testcontainers | ==4.14.2 → ==4.15.0 |
||
| ty (changelog) | ==0.0.61 → ==0.0.63 |
Release Notes
fastapi/fastapi (fastapi)
v0.140.0
Refactors
⚡ Reduce memory usage in dependencies. MR #16049 by @tiangolo.
Docs
📝 Fix links in docs. MR #15967 by @YuriiMotov.📝 Add Library Skills documentation. MR #16041 by @tiangolo.📝 Update docs to use uv projects by default. MR #16032 by @tiangolo.📝 Restructure FastAPI People and related pages. MR #16015 by @tiangolo.
Internal
👷 Add CI memory benchmark. MR #16046 by @tiangolo.👥 Update FastAPI People - Sponsors. MR #16027 by @tiangolo.🔥 Remove now-obsolete scripts to generate data for FastAPI People. MR #16016 by @tiangolo.
astral-sh/ruff (ruff)
v0.16.0
Released on 2026-07-23.
Check out the blog post for a migration guide and overview of the changes!
Breaking changes
-
Ruff now enables a much larger set of rules by default (413, up from 59). See the blog post for more details and the new Default Rules page for a full listing of the enabled rules. Note that this is primarily an expansion, but 18 of the more opinionated pycodestyle (
E) and pyflakes (F) rules have been removed from the default set:E401,E402,E701,E702,E703,E711,E712,E713,E714,E721,E731,E741,E742,E743,F403,F405,F406, andF722. -
Ruff can now format Python code blocks in Markdown files and will do this by default. See the documentation for more details.
-
Ruff now supports
ruff: ignorecomments at the ends of lines, likenoqacomments, or on the line preceding a diagnostic. For example, these both suppress anunused-import(F401) diagnostic:import math # ruff: ignore[F401] # ruff: ignore[F401] import os -
Fixes are now shown in
checkandformat --checkoutput:❯ ruff format --check . unformatted: File would be reformatted --> try.md:1:1 | 1 | ```python - import math 2 + import math 3 | ``` | 1 file would be reformattedThis example also shows off the Markdown formatting.
-
format --checknow supports the same output formats as the linter, including thegithubandgitlaboutputs for rendering annotations in CI:❯ ruff format --check --output-format github . ::error title=ruff (unformatted),file=try.md,line=2,col=8,endLine=2,endColumn=10::try.md:2:8: unformatted: File would be reformattedSee the CLI help or documentation for the full list of supported formats.
-
The
filename,location,end_location,fix.edits[].location, andfix.edits[].end_locationfields in the JSON output format may now benullrather than defaulting to the empty string and row 1, column 1, respectively.
Stabilization
The following rules have been stabilized and are no longer in preview:
airflow3-incompatible-function-signature(AIR303)missing-copyright-notice(CPY001)unnecessary-from-float(FURB164)sorted-min-max(FURB192)implicit-string-concatenation-in-collection-literal(ISC004)log-exception-outside-except-handler(LOG004)invalid-bool-return-type(PLE0304)too-many-positional-arguments(PLR0917)stop-iteration-return(PLR1708)none-not-at-end-of-union(RUF036)access-annotations-from-class-dict(RUF063)duplicate-entry-in-dunder-all(RUF068)
The following behaviors have been stabilized:
blind-except(BLE001) is now suppressed when the exception is logged vialoggingmethods other thancritical,errorandexception.future-required-type-annotation(FA102) now checks for additional PEP 585-compatible APIs, such as those fromcollections.abc.f-string-in-get-text-func-call(INT001),format-in-get-text-func-call(INT002), andprintf-in-get-text-func-call(INT003) now check for additional common ways of using thegettextmodule, such as assigning it tobuiltins._.suspicious-url-open-usage(S310) now resolves local string literal bindings to avoid more false positives.snmp-insecure-version(S508) andsnmp-weak-cryptography(S509) now support the recommended API from newer versions of PySNMP.typing-text-str-alias(UP019) now recognizestyping_extensions.Textin addition totyping.Text.
Preview features
- [
pyupgrade] Fix false positive withTypeVardefault before Python 3.13 (UP040) (#26888)
Bug fixes
- [
ruff] Fix missing check on unrecognized early bound (RUF016) (#26986)
Rule changes
- Insert a space after the colon in Ruff suppression comments (#27123)
Performance
- [
pyupgrade] Speed upunnecessary-future-import(UP010) (#27047)
Documentation
- [
ruff] Add missing period in "Why is this bad?" section (RUF200) (#26930) - [
flake8-simplify] Clarifyos.environbehavior on Windows (SIM112) (#26972) - [
pydocstyle] Document fix safety (D400) (#26971)
Contributors
v0.15.22
Release Notes
Released on 2026-07-16.
Preview features
- [
pycodestyle] Add an autofix forE402(#22212) - [
refurb] Allow subclassing builtins in stub files (FURB189) (#26812) - [
ruff] Add rule to replacenoqacomments withruff:ignore(RUF105) (#26423) - [
ruff] Add rule to use human-readable names inruff:ignorecomments (RUF106) (#26682) - [
ruff] Add rule to use human-readable names in configuration selectors (RUF201) (#26772)
Bug fixes
- [
flake8-pyi] Fix false positive in__all__(PYI053) (#26872)
Rule changes
- [
pylint] Ignore mutable type updates inredefined-loop-name(PLW2901) (#25733)
Performance
- Avoid redundant lexer token bookkeeping (#26765)
- Avoid redundant pending-indentation writes (#26774)
- Avoid unnecessary identifier lookahead (#26525)
- Reuse parser scratch buffers (#26798)
Documentation
- Document argfile support (#26803)
- [
flake8-datetimez] Clarify naming guidance fordatetime.today(DTZ002) (#26658) - [
pycodestyle] DocumentE731fix safety (#26847) - [
ruff] Clarify intentional async contexts forunused-async(RUF029) (#26641)
Contributors
Install ruff 0.15.22
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.22/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.22/ruff-installer.ps1 | iex"Download ruff 0.15.22
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>v0.15.21
Release Notes
Released on 2026-07-09.
Preview features
- Add
--add-ignorefor addingruff:ignorecomments (#26346) - [
flake8-comprehensions] DropC409tuple comprehension preview behavior (#25707) - Avoid whitespace normalization when formatting comments (#26455)
- [
pyupgrade] Lint and fix use of deprecatedabcdecorators (UP051) (#26417)
Bug fixes
- Refine non-empty f-string detection (#26526)
- Detect syntax errors in individual notebook cells (#26419)
- [
flake8-implicit-str-concat] FixISC003autofix incorrectly stripping+from comments (#26554)
Rule changes
- [
flake8-executable] MarkEXE004fix as unsafe (#26033) - [
flake8-pyi] MarkPYI061fixes as unsafe in Python files (#26533) - [
pydocstyle] Skipoverload-with-docstringin stub files (D418) (#26318)
Performance
- Avoid per-token source index visitor calls (#26506)
- Cache parenthesized expression boundaries in the formatter (#26344)
- Improve performance of rendering edits in preview mode (#26565)
- Inline
fits_elementin formatter (#26429) - Inline formatter printing hot paths (#26504)
- Lazily create builtin bindings (#26510)
- Skip empty trivia scans in the source indexer (#26507)
- Use ICF for macOS release builds (#25780)
Formatter
- Add
--extend-excludetoruff format(#26372)
Documentation
- Add "How does Ruff's import sorting compare to isort?" link to README (#26530)
- Fix Mozilla Firefox repository link in README (#26537)
- [
flake8-bandit] Fix misleading docstring formako-templates(S702) (#26432) - [
ruff] Fix non-triggering example forif-key-in-dict-del(RUF051) (#26433)
Contributors
- @EkriirkE
- @tingerrr
- @s-rigaud
- @nikolauspschuetz
- @Avasam
- @ntBre
- @omar-y-abdi
- @AlexWaygood
- @sylvestre
- @shaanmajid
- @lerebear
- @baltasarblanco
- @Sanjays2402
- @ZedThree
- @servusdei2018
- @charliermarsh
- @jesco-absolute
- @velikodniy
- @zaniebot
- @epage
Install ruff 0.15.21
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.21/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.21/ruff-installer.ps1 | iex"Download ruff 0.15.21
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>v0.15.20
Release Notes
Released on 2026-06-25.
Preview features
- Allow human-readable names in rule selectors (#25887)
- Emit a warning instead of an error for unknown rule selectors (#26113)
- Match
noqashebang handling inruff:ignorecomments (#26286) - [
ruff] Removepytest-fixture-autouse(RUF076) (#26240, #26371)
Documentation
- Add versioning sections to custom crate READMEs (#26317)
- Update
ruff_python_parserREADME for crates.io (#26315) - [
perflint] Clarify thatPERF402applies to any iterable (#26242)
Contributors
Install ruff 0.15.20
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.20/ruff-installer.ps1 | iex"Download ruff 0.15.20
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>v0.15.19
Release Notes
Released on 2026-06-23.
Preview features
- Support human-readable names when hovering suppression comments and in code actions (#26114)
Bug fixes
- Fall back to default settings when editor-only settings are invalid (#26244)
- Fix panic when inserting text at a notebook cell boundary (#26111)
Rule changes
- [
pylint] Update fix suggestions for__floor__,__trunc__,__length_hint__, and__matmul__variants (PLC2801) (#26239)
Performance
- Avoid allocating when parsing single string literals (#26200)
- Avoid reallocating singleton call arguments (#26223)
- Lazily create source files for lint diagnostics (#26226)
- Optimize formatter text width and indentation (#26236)
- Reserve capacity for builtin bindings (#26229)
- Skip repeated-key checks for singleton dictionaries (#26228)
- Use ArrayVec for qualified name segments (#26224)
Documentation
- [
flake8-pyi] Note thatPYI051is an opinionated stylistic rule (#26179) - [
pyupgrade] ClarifyUP029as a Python 2 compatibility rule (#26243)
Other changes
- Publish Ruff crates to crates.io (#26271)
Contributors
Install ruff 0.15.19
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.19/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.19/ruff-installer.ps1 | iex"Download ruff 0.15.19
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>v0.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>v0.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>v0.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>v0.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>v0.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>v0.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>v0.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>v0.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>v0.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>v0.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>v0.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 MR 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>v0.15.7
Release Notes
Released on 2026-03-19.
Preview features
- Display output severity in preview (#23845)
- Don't show
noqahover for non-Python documents (#24040)
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>v0.15.6
Release Notes
Released on 2026-03-12.
Preview features
- Add support for
lazyimport parsing (#23755) - Add support for star-unpacking of comprehensions (PEP 798) (#23788)
- Reject semantic syntax errors for lazy imports (#23757)
- Drop a few rules from the preview default set (#23879)
- [
airflow] FlagVariable.get()calls outside of task execution context (AIR003) (#23584) - [
airflow] Flag runtime-varying values in DAG/task constructor arguments (AIR304) (#23631) - [
flake8-bugbear] Implementdelattr-with-constant(B043) (#23737) - [
flake8-tidy-imports] AddTID254to enforce lazy imports (#23777) - [
flake8-tidy-imports] Allow users to ban lazy imports withTID254(#23847) - [
isort] Retainlazykeyword when sorting imports (#23762) - [
pyupgrade] Addfrom __future__ import annotationsautomatically (UP006) (#23260) - [
refurb] Supportnewlineparameter inFURB101for Python 3.13+ (#23754) - [
ruff] Addos-path-commonprefix(RUF071) (#23814) - [
ruff] Add unsafe fix for os-path-commonprefix (RUF071) (#23852) - [
ruff] LimitRUF036to typing contexts; make it unsafe for non-typing-only (#23765) - [
ruff] Use starred unpacking forRUF017in Python 3.15+ (#23789)
Bug fixes
- Fix
--add-noqacreating unwanted leading whitespace (#23773) - Fix
--add-noqabreaking shebangs (#23577) - [formatter] Fix lambda body formatting for multiline calls and subscripts (#23866)
- [formatter] Preserve required annotation parentheses in annotated assignments (#23865)
- [formatter] Preserve type-expression parentheses in the formatter (#23867)
- [
flake8-annotations] Fix stack overflow inANN401on quoted annotations with escape sequences (#23912) - [
pep8-naming] Check naming conventions inmatchpattern bindings (N806,N815,N816) (#23899) - [
perflint] Fix comment duplication in fixes (PERF401,PERF403) (#23729) - [
pyupgrade] Properly triggersuperchange in nested class (UP008) (#22677) - [
ruff] Avoid syntax errors inRUF036fixes (#23764)
Rule changes
- [
flake8-bandit] FlagS501withrequests.request(#23873) - [
flake8-executable] Fix WSL detection in non-Docker containers (#22879) - [
flake8-print] Ignorepprintcalls withstream=(#23787)
Documentation
- Update docs for Markdown code block formatting (#23871)
- [
flake8-bugbear] Fix misleading description forB904(#23731)
Contributors
- @zsol
- @carljm
- @ntBre
- @Bortlesboat
- @sososonia-cyber
- @chirizxc
- @leandrobbraga
- @11happy
- @Acelogic
- @anishgirianish
- @amyreese
- @xvchris
- @charliermarsh
- @getehen
- @Dev-iL
Install ruff 0.15.6
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.6/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.6/ruff-installer.ps1 | iex"Download ruff 0.15.6
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>v0.15.5
Release Notes
Released on 2026-03-05.
Preview features
- Discover Markdown files by default in preview mode (#23434)
- [
perflint] ExtendPERF102to comprehensions and generators (#23473) - [
refurb] FixFURB101andFURB103false positives when I/O variable is used later (#23542) - [
ruff] Add fix fornone-not-at-end-of-union(RUF036) (#22829) - [
ruff] Fix false positive forre.splitwith empty string pattern (RUF055) (#23634)
Bug fixes
- [
fastapi] Handle callable class dependencies with__call__method (FAST003) (#23553) - [
pydocstyle] Fix numpy section ordering (D420) (#23685) - [
pyflakes] Fix false positive for names shadowing re-exports (F811) (#23356) - [
pyupgrade] Avoid inserting redundantNoneelements inUP045(#23459)
Documentation
- Document extension mapping for Markdown code formatting (#23574)
- Update default Python version examples (#23605)
Other changes
- Publish releases to Astral mirror (#23616)
Contributors
- @amyreese
- @stakeswky
- @chirizxc
- @anishgirianish
- @bxff
- @zsol
- @charliermarsh
- @ntBre
- @kar-ganap
Install ruff 0.15.5
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.15.5/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ruff/releases/download/0.15.5/ruff-installer.ps1 | iex"Download ruff 0.15.5
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>v0.15.4
Release Notes
Released on 2026-02-26.
This is a follow-up release to 0.15.3 that resolves a panic when the new rule PLR1712 was enabled with any rule that analyzes definitions, such as many of the ANN or D rules.
Bug fixes
- Fix panic on access to definitions after analyzing definitions (#23588)
- [
pyflakes] Suppress false positive inF821for names used beforedelin stub files (#23550)
Documentation
- Clarify first-party import detection in Ruff (#23591)
- Fix incorrect
import-headingexample (#23568)
Contributors
Install ruff 0.15.4
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.15.4/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ruff/releases/download/0.15.4/ruff-installer.ps1 | iex"Download ruff 0.15.4
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>v0.15.3
Release Notes
Released on 2026-02-26.
Preview features
-
Drop explicit support for
.qmdfile extension (#23572)This can now be enabled instead by setting the
extensionoption:# ruff.toml extension = { qmd = "markdown" } # pyproject.toml [tool.ruff] extension = { qmd = "markdown" } -
Include configured extensions in file discovery (#23400)
-
[
flake8-bandit] Allow suspicious imports inTYPE_CHECKINGblocks (S401-S415) (#23441) -
[
flake8-bugbear] AllowB901in pytest hook wrappers (#21931) -
[
flake8-import-conventions] Add missing conventions from upstream (ICN001,ICN002) (#21373) -
[
pydocstyle] Add rule to enforce docstring section ordering (D420) (#23537) -
[
pylint] Implementswap-with-temporary-variable(PLR1712) (#22205) -
[
ruff] Addunnecessary-assign-before-yield(RUF070) (#23300) -
[
ruff] Support file-level noqa inRUF102(#23535) -
[
ruff] Suppress diagnostic for invalid f-strings before Python 3.12 (RUF027) (#23480) -
[
flake8-bandit] Don't flagBaseLoader/CBaseLoaderas unsafe (S506) (#23510)
Bug fixes
- Avoid infinite loop between
I002andPYI025(#23352) - [
pyflakes] Fix false positive for@overloadfromlint.typing-modules(F811) (#23357) - [
pyupgrade] Fix false positive forTypeVardefault before Python 3.12 (UP046) (#23540) - [
pyupgrade] Fix handling of\Nin raw strings (UP032) (#22149)
Rule changes
-
Render sub-diagnostics in the GitHub output format (#23455)
-
[
flake8-bugbear] Tag certainB007diagnostics as unnecessary (#23453) -
[
ruff] Ignore unknown rule codes inRUF100(#23531)These are now flagged by
RUF102instead.
Documentation
- Fix missing settings links for several linters (#23519)
- Update isort action comments heading (#23515)
- [
pydocstyle] Fix double comma in description ofD404(#23440)
Other changes
- Update the Python module (notably
find_ruff_bin) for parity with uv (#23406)
Contributors
- @zanieb
- @o1x3
- @assadyousuf
- @kar-ganap
- @denyszhak
- @amyreese
- @carljm
- @anishgirianish
- @Bnyro
- @danparizher
- @ntBre
- @gcomneno
- @jaap3
- @stakeswky
Install ruff 0.15.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.15.3/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ruff/releases/download/0.15.3/ruff-installer.ps1 | iex"Download ruff 0.15.3
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>v0.15.2
Release Notes
Released on 2026-02-19.
Preview features
-
Expand the default rule set (#23385)
In preview, Ruff now enables a significantly expanded default rule set of 412 rules, up from the stable default set of 59 rules. The new rules are mostly a superset of the stable defaults, with the exception of these rules, which are removed from the preview defaults:
multiple-imports-on-one-line(E401)module-import-not-at-top-of-file(E402)module-import-not-at-top-of-file(E701)multiple-statements-on-one-line-semicolon(E702)useless-semicolon(E703)none-comparison(E711)true-false-comparison(E712)not-in-test(E713)not-is-test(E714)type-comparison(E721)lambda-assignment(E731)ambiguous-variable-name(E741)ambiguous-class-name(E742)ambiguous-function-name(E743)undefined-local-with-import-star(F403)undefined-local-with-import-star-usage(F405)undefined-local-with-nested-import-star-usage(F406)forward-annotation-syntax-error(F722)
If you use preview and prefer the old defaults, you can restore them with configuration like:
# ruff.toml [lint] select = ["E4", "E7", "E9", "F"] # pyproject.toml [tool.ruff.lint] select = ["E4", "E7", "E9", "F"]If you do give them a try, feel free to share your feedback in the GitHub discussion!
-
[
flake8-pyi] Also check string annotations (PYI041) (#19023)
Bug fixes
- [
flake8-async] Fixin_async_contextlogic (#23426) - [
ruff] Fix forRUF102should delete entire comment (#23380) - [
ruff] Suppress diagnostic for strings with backslashes in interpolations before Python 3.12 (RUF027) (#21069) - [
flake8-bugbear] FixB023false positive for immediately-invoked lambdas (#23294) - [parser] Fix false syntax error for match-like annotated assignments (#23297)
- [parser] Fix indentation tracking after line continuations (#23417)
Rule changes
- [
flake8-executable] Allow global flags in uv shebangs (EXE003) (#22582) - [
pyupgrade] Fix handling oftyping.{io,re}(UP035) (#23131) - [
ruff] DetectPLC0207on chainedstr.split()calls (#23275)
CLI
- Remove invalid inline
noqawarning (#23270)
Configuration
- Add extension mapping to configuration file options (#23384)
Documentation
- Add
Q004to the list of conflicting rules (#23340) - [
ruff] Expandlint.externaldocs and add sub-diagnostic (RUF100,RUF102) (#23268)
Contributors
- @dylwil3
- @Jkhall81
- @danparizher
- @dhruvmanila
- @harupy
- @ngnpope
- @amyreese
- @kar-ganap
- @robsdedude
- @shaanmajid
- @ntBre
- @toslunar
Install ruff 0.15.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.15.2/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ruff/releases/download/0.15.2/ruff-installer.ps1 | iex"Download ruff 0.15.2
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>v0.15.1
Release Notes
Released on 2026-02-12.
Preview features
- [
airflow] Add ruff rules to catch deprecated Airflow imports for Airflow 3.1 (AIR321) (#22376) - [
airflow] Third positional parameter not namedti_keyshould be flagged forBaseOperatorLink.get_link(AIR303) (#22828) - [
flake8-gettext] Fix false negatives for plural argument ofngettext(INT001,INT002,INT003) (#21078) - [
pyflakes] Fix infinite loop in preview fix forunused-import(F401) (#23038) - [
pygrep-hooks] Detect non-existent mock methods in standalone expressions (PGH005) (#22830) - [
pylint] Allow dunder submodules and improve diagnostic range (PLC2701) (#22804) - [
pyupgrade] Improve diagnostic range for tuples (UP024) (#23013) - [
refurb] Check subscripts in tuple do not use lambda parameters inreimplemented-operator(FURB118) (#23079) - [
ruff] Detect mutable defaults infieldcalls (RUF008) (#23046) - [
ruff] Ignore stdcmath.inf(RUF069) (#23120) - [
ruff] New rulefloat-equality-comparison(RUF069) (#20585) - Don't format unlabeled Markdown code blocks (#23106)
- Markdown formatting support in LSP (#23063)
- Support Quarto Markdown language markers (#22947)
- Support formatting
pyconMarkdown code blocks (#23112) - Use extension mapping to select Markdown code block language (#22934)
Bug fixes
- Avoid false positive for undefined variables in
FAST001(#23224) - Avoid introducing syntax errors for
FAST003autofix (#23227) - Avoid suggesting
InitVarfor__post_init__that references PEP 695 type parameters (#23226) - Deduplicate type variables in generic functions (#23225)
- Fix exception handler parenthesis removal for Python 3.14+ (#23126)
- Fix f-string middle panic when parsing t-strings (#23232)
- Wrap
RUF020target for multiline fixes (#23210) - Wrap
UP007target for multiline fixes (#23208) - Fix missing diagnostics for last range suppression in file (#23242)
- [
pyupgrade] Fix syntax error on string with newline escape and comment (UP037) (#22968)
Rule changes
- Use
ruffinstead ofRuffas the program name in GitHub output format (#23240) - [
PT006] Fix syntax error when unpacking nested tuples inparametrizefixes (#22441) (#22464) - [
airflow] Catch deprecated attribute access from context key for Airflow 3.0 (AIR301) (#22850) - [
airflow] Capture deprecated arguments and a decorator (AIR301) (#23170) - [
flake8-boolean-trap] Addmultiprocessing.Valueto excluded functions forFBT003(#23010) - [
flake8-bugbear] Add a secondary annotation showing the previous occurrence (B033) (#22634) - [
flake8-type-checking] Add sub-diagnostic showing the runtime use of an annotation (TC004) (#23091) - [
isort] Support configurable import section heading comments (#23151) - [
ruff] Improve the diagnostic forRUF012(#23202)
Formatter
- Suppress diagnostic output for
format --check --silent(#17736)
Documentation
- Add tabbed shell completion documentation (#23169)
- Explain how to enable Markdown formatting for pre-commit hook (#23077)
- Fixed import in
runtime-evaluated-decoratorsexample (#23187) - Update ruff server contributing guide (#23060)
Other changes
- Exclude WASM artifacts from GitHub releases (#23221)
Contributors
- @mkniewallner
- @bxff
- @dylwil3
- @Avasam
- @amyreese
- @charliermarsh
- @Alex-ley-scrub
- @Kalmaegi
- @danparizher
- @AiyionPrime
- @eureka928
- @11happy
- @Jkhall81
- @chirizxc
- @leandrobbraga
- @tvatter
- @anishgirianish
- @shaanmajid
- @ntBre
- @sjyangkevin
Install ruff 0.15.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.15.1/ruff-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ruff/releases/download/0.15.1/ruff-installer.ps1 | iex"Download ruff 0.15.1
astral-sh/ty (ty)
v0.0.63
Released on 2026-07-23.
Core type checking
- Handle generic stringified PEP 613 (
typing.TypeAlias) type aliases (#27092) - Allow equality narrowing across non-final classes (#27031)
- Allow interpolated string literals to be promoted to
str(#27104) - Fix double specialization of generic type aliases (#27058)
- Fix intersections of
typeandTypeForm(#27099) - When narrowing from a
matchstatement leads a variablexto be inferred asA & B, infer the type ofx.attras<type of A.attr> & <type of B.attr>(#27103)
Library support
- Pydantic: Stricter validation of sub-model fields in lax mode (#27091)
- Pydantic: Support special underscore parameters in
BaseSettingsmodels (#27098)
Performance
- Avoid exponential narrowing of optional dynamic
matchsubjects (#27100) - Avoid normalizing cached absolute file paths (#26998)
Contributors
v0.0.62
Released on 2026-07-21.
Bug fixes
- Guard recursive
ProtocolandTypedDictrelations (#26990) - Prevent stack overflows in recursive type relation checks (#26503)
- Recover from cancelled file indexing (#26876)
Diagnostics
- Avoid editing ignore comments with trailing reasons (#26939)
- Prefer innermost inline suppressions (#26940)
- Remove unused own-line ignore comments (#27013)
- Reuse applicable own-line suppressions in
--add-ignore(#26925)
Configuration
- Respect
rulesandanalysisin PEP 723 script metadata configurations (#26671)
Core type checking
- Accept gradual constrained TypeVar solutions (#26965)
- Avoid recursive TypeVarTuple alias expansion (#27032)
- Check inherited method conflicts via the MRO (#27019)
- Contextually infer custom
__setattr__assignments (#27015) - Fix
Callableisinstancereachability (#26970) - Fix
Just[float]protocol matching (#27053) - Fix
Selfbinding for classmethod__new__constructors (#27030) - Fix nested short-circuit flow snapshots (#26956)
- Gate
TypedDictPEP 728 parameters by Python version (#26968) - Improve
matchreachability inference around value-pattern branches (#26979) - Make membership and equality narrowing consistent (#26982)
- Preserve constrained TypeVar equality narrowing (#26988)
- Preserve constrained TypeVar inequality narrowing (#26995)
- Preserve unsatisfiable generic call constraints (#26964)
- Respect bounded typevars in union inference (#27023)
- Respect metaclass
__setattr__for class attributes (#27000)
Performance
- Cache non-terminal-call reachability prefixes (#26810)
- Cache protocol
Selfbinding (#26997) - Cache sparse reachability checkpoints (#26811)
- Defer statement-call narrowing gates (#26793)
Contributors
Configuration
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
- If you want to rebase/retry this MR, check this box
This MR has been generated by Mend Renovate.