Ruff

Latest version: v0.8.6

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 19 of 28

0.5.0

- Follow the XDG specification to discover user-level configurations on macOS (same as on other Unix platforms)
- Selecting `ALL` now excludes deprecated rules
- The released archives now include an extra level of nesting, which can be removed with `--strip-components=1` when untarring.
- The release artifact's file name no longer includes the version tag. This enables users to install via `/latest` URLs on GitHub.

0.4.10

Parser

- Implement re-lexing logic for better error recovery ([11845](https://github.com/astral-sh/ruff/pull/11845))

Rule changes

- \[`flake8-copyright`\] Update `CPY001` to check the first 4096 bytes instead of 1024 ([11927](https://github.com/astral-sh/ruff/pull/11927))
- \[`pycodestyle`\] Update `E999` to show all syntax errors instead of just the first one ([11900](https://github.com/astral-sh/ruff/pull/11900))

Server

- Add tracing setup guide to Helix documentation ([11883](https://github.com/astral-sh/ruff/pull/11883))
- Add tracing setup guide to Neovim documentation ([11884](https://github.com/astral-sh/ruff/pull/11884))
- Defer notebook cell deletion to avoid an error message ([11864](https://github.com/astral-sh/ruff/pull/11864))

Security

- Guard against malicious ecosystem comment artifacts ([11879](https://github.com/astral-sh/ruff/pull/11879))

0.4.9

Preview features

- \[`pylint`\] Implement `consider-dict-items` (`C0206`) ([11688](https://github.com/astral-sh/ruff/pull/11688))
- \[`refurb`\] Implement `repeated-global` (`FURB154`) ([11187](https://github.com/astral-sh/ruff/pull/11187))

Rule changes

- \[`pycodestyle`\] Adapt fix for `E203` to work identical to `ruff format` ([10999](https://github.com/astral-sh/ruff/pull/10999))

Formatter

- Fix formatter instability for lines only consisting of zero-width characters ([11748](https://github.com/astral-sh/ruff/pull/11748))

Server

- Add supported commands in server capabilities ([11850](https://github.com/astral-sh/ruff/pull/11850))
- Use real file path when available in `ruff server` ([11800](https://github.com/astral-sh/ruff/pull/11800))
- Improve error message when a command is run on an unavailable document ([11823](https://github.com/astral-sh/ruff/pull/11823))
- Introduce the `ruff.printDebugInformation` command ([11831](https://github.com/astral-sh/ruff/pull/11831))
- Tracing system now respects log level and trace level, with options to log to a file ([11747](https://github.com/astral-sh/ruff/pull/11747))

CLI

- Handle non-printable characters in diff view ([11687](https://github.com/astral-sh/ruff/pull/11687))

Bug fixes

- \[`refurb`\] Avoid suggesting starmap when arguments are used outside call (`FURB140`) ([11830](https://github.com/astral-sh/ruff/pull/11830))
- \[`flake8-bugbear`\] Avoid panic in `B909` when checking large loop blocks ([11772](https://github.com/astral-sh/ruff/pull/11772))
- \[`refurb`\] Fix misbehavior of `operator.itemgetter` when getter param is a tuple (`FURB118`) ([11774](https://github.com/astral-sh/ruff/pull/11774))

0.4.8

Performance

- Linter performance has been improved by around 10% on some microbenchmarks by refactoring the lexer and parser to maintain synchronicity between them ([11457](https://github.com/astral-sh/ruff/pull/11457))

Preview features

- \[`flake8-bugbear`\] Implement `return-in-generator` (`B901`) ([11644](https://github.com/astral-sh/ruff/pull/11644))
- \[`flake8-pyi`\] Implement `pep484-style-positional-only-parameter` (`PYI063`) ([11699](https://github.com/astral-sh/ruff/pull/11699))
- \[`pygrep_hooks`\] Check blanket ignores via file-level pragmas (`PGH004`) ([11540](https://github.com/astral-sh/ruff/pull/11540))

Rule changes

- \[`pyupgrade`\] Update `UP035` for Python 3.13 and the latest version of `typing_extensions` ([11693](https://github.com/astral-sh/ruff/pull/11693))
- \[`numpy`\] Update `NPY001` rule for NumPy 2.0 ([11735](https://github.com/astral-sh/ruff/pull/11735))

Server

- Formatting a document with syntax problems no longer spams a visible error popup ([11745](https://github.com/astral-sh/ruff/pull/11745))

CLI

- Add RDJson support for `--output-format` flag ([11682](https://github.com/astral-sh/ruff/pull/11682))

Bug fixes

- \[`pyupgrade`\] Write empty string in lieu of panic when fixing `UP032` ([11696](https://github.com/astral-sh/ruff/pull/11696))
- \[`flake8-simplify`\] Simplify double negatives in `SIM103` ([11684](https://github.com/astral-sh/ruff/pull/11684))
- Ensure the expression generator adds a newline before `type` statements ([11720](https://github.com/astral-sh/ruff/pull/11720))
- Respect per-file ignores for blanket and redirected noqa rules ([11728](https://github.com/astral-sh/ruff/pull/11728))

0.4.7

Preview features

- \[`flake8-pyi`\] Implement `PYI064` ([11325](https://github.com/astral-sh/ruff/pull/11325))
- \[`flake8-pyi`\] Implement `PYI066` ([11541](https://github.com/astral-sh/ruff/pull/11541))
- \[`flake8-pyi`\] Implement `PYI057` ([11486](https://github.com/astral-sh/ruff/pull/11486))
- \[`pyflakes`\] Enable `F822` in `__init__.py` files by default ([11370](https://github.com/astral-sh/ruff/pull/11370))

Formatter

- Fix incorrect placement of trailing stub function comments ([11632](https://github.com/astral-sh/ruff/pull/11632))

Server

- Respect file exclusions in `ruff server` ([11590](https://github.com/astral-sh/ruff/pull/11590))
- Add support for documents not exist on disk ([11588](https://github.com/astral-sh/ruff/pull/11588))
- Add Vim and Kate setup guide for `ruff server` ([11615](https://github.com/astral-sh/ruff/pull/11615))

Bug fixes

- Avoid removing newlines between docstring headers and rST blocks ([11609](https://github.com/astral-sh/ruff/pull/11609))
- Infer indentation with imports when logical indent is absent ([11608](https://github.com/astral-sh/ruff/pull/11608))
- Use char index rather than position for indent slice ([11645](https://github.com/astral-sh/ruff/pull/11645))
- \[`flake8-comprehension`\] Strip parentheses around generators in `C400` ([11607](https://github.com/astral-sh/ruff/pull/11607))
- Mark `repeated-isinstance-calls` as unsafe on Python 3.10 and later ([11622](https://github.com/astral-sh/ruff/pull/11622))

0.4.6

Breaking changes

- Use project-relative paths when calculating GitLab fingerprints ([11532](https://github.com/astral-sh/ruff/pull/11532))
- Bump minimum supported Windows version to Windows 10 ([11613](https://github.com/astral-sh/ruff/pull/11613))

Preview features

- \[`flake8-async`\] Sleep with >24 hour interval should usually sleep forever (`ASYNC116`) ([11498](https://github.com/astral-sh/ruff/pull/11498))

Rule changes

- \[`numpy`\] Add missing functions to NumPy 2.0 migration rule ([11528](https://github.com/astral-sh/ruff/pull/11528))
- \[`mccabe`\] Consider irrefutable pattern similar to `if .. else` for `C901` ([11565](https://github.com/astral-sh/ruff/pull/11565))
- Consider `match`-`case` statements for `C901`, `PLR0912`, and `PLR0915` ([11521](https://github.com/astral-sh/ruff/pull/11521))
- Remove empty strings when converting to f-string (`UP032`) ([11524](https://github.com/astral-sh/ruff/pull/11524))
- \[`flake8-bandit`\] `request-without-timeout` should warn for `requests.request` ([11548](https://github.com/astral-sh/ruff/pull/11548))
- \[`flake8-self`\] Ignore sunder accesses in `flake8-self` rules ([11546](https://github.com/astral-sh/ruff/pull/11546))
- \[`pyupgrade`\] Lint for `TypeAliasType` usages (`UP040`) ([11530](https://github.com/astral-sh/ruff/pull/11530))

Server

- Respect excludes in `ruff server` configuration discovery ([11551](https://github.com/astral-sh/ruff/pull/11551))
- Use default settings if initialization options is empty or not provided ([11566](https://github.com/astral-sh/ruff/pull/11566))
- `ruff server` correctly treats `.pyi` files as stub files ([11535](https://github.com/astral-sh/ruff/pull/11535))
- `ruff server` searches for configuration in parent directories ([11537](https://github.com/astral-sh/ruff/pull/11537))
- `ruff server`: An empty code action filter no longer returns notebook source actions ([11526](https://github.com/astral-sh/ruff/pull/11526))

Bug fixes

- \[`flake8-logging-format`\] Fix autofix title in `logging-warn` (`G010`) ([11514](https://github.com/astral-sh/ruff/pull/11514))
- \[`refurb`\] Avoid recommending `operator.itemgetter` with dependence on lambda arguments ([11574](https://github.com/astral-sh/ruff/pull/11574))
- \[`flake8-simplify`\] Avoid recommending context manager in `__enter__` implementations ([11575](https://github.com/astral-sh/ruff/pull/11575))
- Create intermediary directories for `--output-file` ([11550](https://github.com/astral-sh/ruff/pull/11550))
- Propagate reads on global variables ([11584](https://github.com/astral-sh/ruff/pull/11584))
- Treat all `singledispatch` arguments as runtime-required ([11523](https://github.com/astral-sh/ruff/pull/11523))

Page 19 of 28

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.