ruff
0.17.5An extremely fast Python linter and code formatter, written in Rust.
- Maintenance
- Active1382 commits in 3 months · bus factor 3
- License
- MITPermissive · OSI-approved
- Security
- No advisories publishedNothing published on GitHub
- Supported versions
- No scheduleendoflife.date does not track this project
51.3k stars · 2.7k forks · 2.3k open issues · last release 2 days ago · data checked 4 hours ago
Breaking changes
What to check before upgrading, taken from the notes of the last 30 releases.
- 0.17.0Oct 9, 2026
Breaking changes
- Update the default and latest Python versions for 3.15 (#28792)
Ruff now defaults to Python 3.11 instead of 3.10 when no Python version is configured through
target-versionorrequires-python. When checking for syntax errors without a configured Python version, Ruff now defaults to Python 3.15 instead of 3.14.- Update the default rule set (#28786)
Several of the
flake8-datetimezrules (DTZ001,DTZ005,DTZ006,DTZ007,DTZ011,DTZ012, andDTZ901) are no longer enabled by default, whileundefined-local-with-nested-import-star-usage(F406), which corresponds to a syntax error, is now enabled by default.- Update Rust crate quick-junit to 0.8.0 (#27295)
JUnit output now uses a
skippedattribute instead ofdisabledon `elements and includes askippedattribute on the root` element.- \[
flake8-import-conventions\] Adddatetime as dtas a conventional alias (ICN001) (#28790)
- Support Unicode dummy variable names (#28722)
The default
lint.dummy-variable-rgxnow recognizes underscore-prefixed Unicode names, such as_次, as dummy variables.Ruff now uses Unicode 17 data for identifier normalization and named character escapes (
"\N{...}").- Always show unsafe and display-only fixes in the CLI (#27810)
The default
fulloutput format now shows unsafe fixes and suggestions requiring manual review, regardless of theunsafe-fixessetting. Actually applying unsafe fixes still requires explicit opt-in.- Remove the Python dependency from conda-forge builds (conda-forge/ruff-feedstock#361)
The conda-forge build no longer depends on Python, now supports linux-riscv64, win-arm64, and linux-ppc64le platforms, and now includes shell completions. However, no longer depending on Python means that
python -m ruffandimport ruffwill no longer work. Useruffdirectly fromPATHinstead. PyPI installations and those from the standalone installer are unaffected.- Remove support for ruff-lsp (#28750)
Support for
ruff-lsp, the legacy Python language server deprecated in Ruff v0.9.5, has been removed. The Ruff VS Code extension now always uses the native language server;ruff.nativeServeris deprecated and ignored. See the migration guide. - 0.16.0Jul 23, 2026
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 reformatted - 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 (
Release history
All releases on GitHubRelease Notes
Released on 2026-11-12.
Preview features
- Redirect renamed rules (#30081)
- \[
flake8-async\] Implementpytest-raises-exception-group(ASYNC401) (#28772) - \[
flake8-logging-format\] MarkG004fix as unsafe (#30087) - \[
pylint\] Implementno-method-argument(PLE0211) (#29748) - \[
refurb\] Do not offer fix whenwriteis nested in an expression (FURB103) (#29789) - \[
ruff\] Addrenamed-rule(RUF202) (#30079) - \[
ruff\] Expandredirected-noqato other suppression comments (RUF101) (#30078)
Bug fixes
- Avoid crashing when Ruff logs to a closed stderr pipe (#30209)
- Fix fixes that add or remove a keyword argument with a parenthesized value (#30189)
- \[
flake8-import-conventions\] Avoid shadowing names when fixing import aliases (ICN001) (#30035) - \[
flake8-bugbear\] FixB010autofix for parenthesizedsetattrcalls (#30168) - \[
flake8-pyi\] FixPYI034autofix for parenthesizedselfannotations (#30173) - \[
pyupgrade\] FixUP031duplicating closing parentheses around the format string (#30172)
Rule changes
- \[
flake8-bugbear\] Ignore frozen dataclass instantiations (B008) (#29231)
Performance
- Various performance improvements (#30375, #30211, #30368, #30259, #30354, #30115, #30133, #30132, #30358, #30135, #30369, #30351, #30352, #30347, #30379, #30328, #30329, #29446)
Other changes
- Fix FreeBSD source builds with libc 0.2.190 (#30176)
Contributors
- @rajveer3x
- @tjkuson
- @hugehoo
- @hector2394
- @ansh-rohilla
- @mati-caliz
- @yxshee
- @charliermarsh
- @MichaReiser
- @GeorgiaPreda
- @G26karthik
- @ntBre
- @s-cork
Install ruff 0.17.5
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.17.5/ruff-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.17.5/ruff-installer.ps1 | iex"
Download ruff 0.17.5
| File | Platform | Checksum |
|--------|----------|----------|
| ruff-aarch64-apple-darwin.tar.gz | Apple Silicon macOS | checksum |
| ruff-x86_64-apple-darwin.tar.gz | Intel macOS | checksum |
| ruff-aarch64-pc-windows-msvc.zip | ARM64 Windows | checksum |
| ruff-i686-pc-windows-msvc.zip | x86 Windows | checksum |
| ruff-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| ruff-aarch64-unknown-linux-gnu.tar.gz | ARM64 Linux | checksum |
| ruff-i686-unknown-linux-gnu.tar.gz | x86 Linux | checksum |
| ruff-powerpc64le-unknown-linux-gnu.tar.gz | PPC64LE Linux | checksum |
| ruff-riscv64gc-unknown-linux-gnu.tar.gz | RISCV Linux | checksum |
| ruff-s390x-unknown-linux-gnu.tar.gz | S390x Linux | checksum |
| ruff-x86_64-unknown-linux-gnu.tar.gz | x64 Linux | checksum |
| ruff-armv7-unknown-linux-gnueabihf.tar.gz | ARMv7 Linux | checksum |
| ruff-aarch64-unknown-linux-musl.tar.gz | ARM64 MUSL Linux | checksum |
| ruff-i686-unknown-linux-musl.tar.gz | x86 MUSL Linux | checksum |
| ruff-x86_64-unknown-linux-musl.tar.gz | x64 MUSL Linux | checksum |