Skip to content

ruff

0.17.5
astral-sh/ruff

An extremely fast Python linter and code formatter, written in Rust.

Version of astral-sh/ruff you run

CompareView on GitHub

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-version or requires-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-datetimez rules (DTZ001, DTZ005, DTZ006, DTZ007, DTZ011, DTZ012, and DTZ901) are no longer enabled by default, while undefined-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 skipped attribute instead of disabled on ` elements and includes a skipped attribute on the root ` element.

    • \[flake8-import-conventions\] Add datetime as dt as a conventional alias (ICN001) (#28790)
    • Support Unicode dummy variable names (#28722)

    The default lint.dummy-variable-rgx now 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 full output format now shows unsafe fixes and suggestions requiring manual review, regardless of the unsafe-fixes setting. Actually applying unsafe fixes still requires explicit opt-in.

    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 ruff and import ruff will no longer work. Use ruff directly from PATH instead. 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.nativeServer is 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, and F722.
    • 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: ignore comments at the ends of lines, like noqa comments, or on the line preceding a diagnostic. For example, these both suppress an unused-import (F401) diagnostic:
        import math  # ruff: ignore[F401]
    
        # ruff: ignore[F401]
        import os
    
    • Fixes are now shown in check and format --check output:
        ❯ ruff format --check .
        unformatted: File would be reformatted
         --> try.md:1:1
          |
        1 | ```python
          - import   math
        2 + import math
        3 | ```
          |
    
        1 file would be reformatted
    

    This example also shows off the Markdown formatting.

    • format --check now supports the same output formats as the linter, including the github and gitlab outputs 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
    

Release history

All releases on GitHub
BadgeLatest version of astral-sh/ruff[![version](/badge/astral-sh/ruff)](/p/astral-sh/ruff)

Release Notes

Released on 2026-11-12.

Preview features

  • Redirect renamed rules (#30081)
  • \[flake8-async\] Implement pytest-raises-exception-group (ASYNC401) (#28772)
  • \[flake8-logging-format\] Mark G004 fix as unsafe (#30087)
  • \[pylint\] Implement no-method-argument (PLE0211) (#29748)
  • \[refurb\] Do not offer fix when write is nested in an expression (FURB103) (#29789)
  • \[ruff\] Add renamed-rule (RUF202) (#30079)
  • \[ruff\] Expand redirected-noqa to 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\] Fix B010 autofix for parenthesized setattr calls (#30168)
  • \[flake8-pyi\] Fix PYI034 autofix for parenthesized self annotations (#30173)
  • \[pyupgrade\] Fix UP031 duplicating closing parentheses around the format string (#30172)

Rule changes

  • \[flake8-bugbear\] Ignore frozen dataclass instantiations (B008) (#29231)

Performance

Other changes

  • Fix FreeBSD source builds with libc 0.2.190 (#30176)

Contributors

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 |

Full release notesCompare with previous