Ruff
Dev ToolsAn extremely fast Python linter and code formatter, written in Rust.
Release History
0.15.42 fixesThis patch release (0.15.4) resolves a critical panic that occurred when enabling the new rule PLR1712 alongside definition-analyzing rules. It also includes a fix for a pyflakes false positive in stub files.
0.15.26 fixes2 featuresThis release significantly expands the default rule set available in preview mode, adding 412 rules while removing a few older, overlapping ones. It also includes various bug fixes across several integrated linters and parser improvements.
0.15.113 fixes11 featuresThis release introduces significant improvements to Markdown formatting support, expands preview features for Airflow compatibility, and fixes numerous bugs across various integrated linters. Notably, new rules like `RUF069` for float equality comparison were added.
0.15.0Breaking9 fixes2 featuresThis release introduces the new 2026 style guide for formatting and stabilizes numerous linter rules. It also adds support for block-level suppression comments in the linter.
0.14.143 fixes4 featuresThis release introduces several preview features, including better lambda body parenthesis preservation and duplicate `__all__` detection. Numerous rule fixes were applied, with many now marked as unsafe if they would remove comments.
0.14.132 fixes2 featuresRelease 0.14.13 mirrors 0.14.12, containing preview feature enhancements for linting rules and bug fixes related to configuration display and formatting skips. A change was also introduced requiring explicit logging initialization for WASM builds.
0.14.112 fixes14 featuresRuff 0.14.11 introduces several preview diagnostics, new rule enhancements, and configuration improvements, along with bug fixes and expanded Python 3.15 preview support.
0.14.102 fixes8 featuresRuff 0.14.10 introduces fluent formatter enhancements, new linting rules, and several rule behavior updates along with bug fixes and documentation improvements.
0.14.94 fixes6 featuresRuff 0.14.9 introduces new RUF100 diagnostics, adds pylint PLW0133 detection, improves performance with memchr, and includes several bug fixes and rule updates.
0.14.82 fixes2 featuresRuff 0.14.8 introduces new preview lint rules for flake8-bugbear and flake8-use-pathlib, and fixes several false‑positive and truthiness bugs.
0.14.73 fixes6 featuresRuff 0.14.7 introduces new preview rules (RUF066, RUF052) and several linting fixes, adds a CLI fixability indicator, and includes bug fixes for server diagnostics, ISC003 handling, and IPython parsing.
0.14.66 fixes3 featuresRuff 0.14.6 adds preview support for new PySNMP API paths, new CLI options for hyperlink rendering and skipping TYPE_CHECKING imports, and includes several bug fixes and rule improvements.
0.14.54 fixes10 featuresRuff 0.14.5 introduces several preview linting rules, new CLI options, and improvements to configuration error messages while fixing multiple false‑positive bugs.
0.14.44 fixes5 featuresRuff 0.14.4 adds several preview formatter and refurb enhancements, fixes diagnostics and rule issues, and improves Jupyter notebook support.
0.14.3Breaking11 fixes9 featuresRuff 0.14.3 introduces several preview features such as `--output-format` support with `--watch` and new eager conversion patterns, fixes numerous false‑positive bugs, and adds a breaking change by removing the Airflow `DAG.create_dagrun` API.
0.14.210 fixes3 featuresRuff 0.14.2 adds a preview feature for flake8-gettext, improves CLI JSON output, and introduces DiagnosticTag support, while fixing numerous bugs across fastapi, pyupgrade, and other rules.
0.14.16 fixes11 featuresRuff 0.14.1 adds several preview features, fixes numerous false‑positive/negative bugs, introduces new rule warnings and tags, updates Python compatibility to 3.14, and reduces binary size.
0.14.0Breaking6 fixes3 featuresRuff 0.14.0 updates the default Python target to 3.14, adds several preview rule enhancements, and includes numerous bug fixes across flake8‑annotations, flynt, isort, and Ruff itself.
0.13.35 fixes4 featuresRuff 0.13.3 introduces diff display for format checks, new import handling, and several rule improvements, along with bug fixes and documentation updates.
0.13.27 fixes5 featuresRuff 0.13.2 adds several new preview linting rules, includes `.pyw` files by default, and fixes a range of bugs across multiple flake8 plugins and core checks.
0.13.17 fixes11 featuresRuff 0.13.1 introduces several preview lint fixes, new rule behaviors, CLI improvements, and numerous bug fixes, while raising the Rust MSRV to 1.88.
0.13.0Breaking2 fixes2 featuresRuff 0.13.0 introduces automatic future‑annotations insertion for several rules, tighter first‑party import detection, removal of the deprecated macOS config fallback, and adds preview support for UP043 in stub files along with uv formatter backend support.
0.12.125 fixes8 featuresRuff 0.12.12 introduces default display of fixes, several new and adjusted linting rules (including Airflow schedule conversion and a blocking‑input rule), and a collection of bug fixes and documentation updates.
0.12.114 fixes6 featuresRuff 0.12.11 introduces several preview features across airflow, flake8-async, flake8-logging-format, and flake8-use-pathlib, along with bug fixes for false positives and whitespace handling. No breaking changes are reported, and upgrade steps are straightforward.
0.12.103 fixes4 featuresRuff 0.12.10 introduces preview fixes for flake8‑simplify and flake8‑use‑pathlib, improves rule behavior for E731 and F811, and includes several bug fixes across isort and pyupgrade.
0.12.93 fixes6 featuresRuff 0.12.9 introduces new preview checks, rule updates, bug fixes, and improved output formatting without breaking changes.
0.12.815 fixes1 featureRuff 0.12.8 adds a preview expansion of PTH201 for all PurePath subclasses, introduces several rule updates, and fixes numerous bugs across flake8, isort, pylint, pyupgrade, and Ruff itself.
0.12.77 fixes5 featuresRuff 0.12.7 republishes 0.12.6 with corrected package metadata and includes preview features, numerous bug fixes, a rule change, and a small performance enhancement.
0.12.55 fixes2 featuresRuff 0.12.5 introduces autofixes for several pathlib-related lint rules and adds support for byte strings, while fixing parser panics, rule handling bugs, and false positives.
0.12.47 fixes3 featuresRuff 0.12.4 introduces new preview features for future annotations, autofixes, and indirect pathlib detection, along with numerous bug fixes and rule adjustments.
0.12.34 fixes3 featuresRuff 0.12.3 adds new autofixes for many pathlib rules, supports non-context-manager calls in B017, and includes several bug fixes and documentation improvements.
0.12.210 fixes2 featuresRuff 0.12.2 introduces preview features for flake8-pyi and pyupgrade, adds several rule adjustments, and includes numerous bug fixes and documentation updates.
0.12.133 fixes14 featuresThis release adds several new lint rules and autofixes, improves formatter handling, and includes numerous bug fixes and safety enhancements across multiple plugins.
0.12.0Breaking10 fixes2 featuresRuff 0.12.0 introduces stricter syntax‑error detection, updates f‑string handling, drops the `rust-toolchain.toml` from distributions, deprecates the pandas‑df‑variable‑name rule, adds preview checks for pytest helpers, and includes numerous bug fixes.
0.11.133 fixes5 featuresRuff 0.11.13 introduces several preview features, adds Python 3.14 t‑string support, and includes bug fixes across multiple plugins.
0.11.123 fixes8 featuresRuff 0.11.12 adds several new preview rules and autofixes, improves diagnostics, and fixes bugs across multiple plugins.
0.11.112 fixes5 featuresRuff 0.11.11 introduces several preview Airflow and flake8‑simplify autofixes, adds a CLI formatter warning improvement, and includes bug fixes for match‑case formatting and a pylint rule.
0.11.106 fixes7 featuresRuff 0.11.10 introduces several preview features such as recursive RUF060 checks and new Airflow rule autofixes, adds rule deprecations, fixes numerous bugs, and disables jemalloc on Android.
0.11.9Breaking5 fixes9 featuresRuff 0.11.9 introduces several preview features—including defaulting to the latest Python version and a new `in‑empty‑collection` rule—adds a virtual‑env option for `ruff analyze graph`, and fixes a range of bugs and documentation updates.
0.11.88 fixes6 featuresRuff 0.11.8 introduces several preview Airflow rules, new syntax‑error detections, and numerous bug fixes, while adding Python 3.14 support and a configuration option to disable typing_extensions imports.
0.11.74 fixes6 featuresRuff 0.11.7 introduces several preview features and rule enhancements, fixes bugs across multiple plugins, and adds documentation for fix safety.
0.11.61 fix2 featuresRuff 0.11.6 introduces preview features for docstring handling and Airflow rule extraction, and fixes a syntax error when a backslash appears at the end of a file.
0.11.51 fix9 featuresRuff 0.11.5 introduces several new Airflow and syntax‑error checks, updates rule handling, and fixes false‑positive bugs across flake8 plugins.
0.11.42 fixes4 featuresRuff 0.11.4 adds preview support for new syntax‑error checks and the RUF102 rule, and fixes issues with match pattern assignments and typing.Annotated handling.
0.11.32 fixes14 featuresRuff 0.11.3 introduces numerous new linting rules and syntax‑error detections, adds autofixes for Airflow rules, expands trusted‑input handling, and includes several bug fixes and CLI improvements.
0.11.21 fixRuff 0.11.2 includes a preview fix that eliminates false‑positive syntax‑error reports for variadic parameter annotations on Python <3.11.
0.11.15 fixes9 featuresRuff 0.11.1 introduces new airflow chain utilities, several syntax‑error preview improvements, a new `--exit-non-zero-on-format` flag, and fixes across server handling, flake8‑bandit, refurb, and statistics reporting.
0.11.0Breaking1 featureRuff 0.11.0 introduces updated Python version inference based on `requires-python`, stabilizes PGH004 detection, and adds a preview syntax-errors feature for tuple unpacking before Python 3.9.
0.10.0Breaking2 fixesRuff 0.10.0 adds several breaking changes—including updated TYPE_CHECKING handling, stricter noqa parsing, and a Docker base image bump—while deprecating two rules and some configuration options.
0.9.106 fixes10 featuresRuff 0.9.10 introduces a preview rule RUF059 and expands syntax‑error detection for older Python versions, while fixing several bugs and adjusting the GitLab output serializer.
0.9.91 fix1 featureRuff 0.9.9 adds a preview fix for caching unsupported-syntax errors and adjusts editor behavior to display those errors only when preview mode is enabled.
0.9.87 fixes9 featuresRuff 0.9.8 introduces preview syntax‑error detection, several new lint rules, expanded server configuration options, a per‑file target version setting, and numerous bug fixes and documentation updates.
0.9.713 fixes12 featuresRuff 0.9.7 introduces several preview features, new linting rules, and improvements to the language server and CLI, while fixing numerous bugs across multiple plugins and the formatter.
0.9.62 fixes7 featuresRuff 0.9.6 introduces new Airflow task markers, optional strict module name checks, several new linting rules, server root exclusions, and fixes bugs in flake8-datetime and flake8-type-checking.
0.9.58 fixes25 featuresRuff 0.9.5 adds numerous preview features, rule enhancements, and bug fixes while deprecating the `lint.extendIgnore` setting and ruff‑lsp related settings.
0.9.43 fixes18 featuresRuff 0.9.4 introduces several preview features, rule enhancements, CLI improvements, and bug fixes, along with updated documentation.
0.9.39 fixes12 featuresThis release introduces several new preview features across various linters, including PEP 695 generics support and new Ruff rules. It also includes numerous bug fixes and improvements to existing rule logic, particularly around import handling and code generation.
0.9.29 fixes13 featuresRuff 0.9.2 introduces numerous preview features, rule enhancements, formatter and server improvements, and a collection of bug fixes, while removing the deprecated "flatten" configuration option.
0.9.13 fixes4 featuresRuff 0.9.1 introduces several preview diagnostics, improves rule messages, adds a formatter tweak, and fixes bugs in the server sync and specific lint rules.
Common Errors
ZeroDivisionError2 reportsZeroDivisionError arises when the denominator in a division or modulo operation is zero. To fix this, add a conditional check to ensure the denominator is not zero before performing the division or modulo, and handle the zero case appropriately (e.g., return a default value, raise a different exception, or log a warning). For example: `if denominator != 0: result = numerator / denominator else: result = 0`
ThreadPoolBuildError1 reportThe "ThreadPoolBuildError" in ruff often arises from resource limitations when creating worker threads, especially with a high number of CPUs. To resolve this, reduce the `concurrency` setting in your ruff configuration file (e.g., pyproject.toml) to a lower value, or explicitly set it to `1` to disable threading and use a single process. If you encounter this error locally, consider if the number of logical cores is being correctly detected.
BaseException1 reportThe "BaseException" error in ruff often arises when code implicitly relies on `BaseException` being in the built-in namespace without explicitly importing it. To fix this, add `from builtins import BaseException` at the top of the file where the error occurs, ensuring `BaseException` is properly defined in the local scope. This makes the code explicit about its dependency and resolves the ruff error.
NotAllowedError1 reportThe "NotAllowedError" often arises when attempting to interact with the clipboard (copy/paste) outside of a user-initiated event handler (like a button click). To fix, ensure clipboard operations are directly triggered by user actions within the appropriate event listener. If using asynchronous functions, carefully manage promises and ensure the clipboard interaction happens before the event flow is interrupted.
Related Dev Tools Packages
Empowering everyone to build reliable and efficient software.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
Next generation frontend tooling. It's fast!
An extremely fast Python package and project manager, written in Rust.
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Subscribe to Updates
Get notified when new versions are released