Ruff

Latest version: v0.8.6

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

Scan your dependencies

Page 27 of 28

0.0.245

Ruff's public `check` method was removed ([2709](https://github.com/astral-sh/ruff/pull/2709))

Previously, Ruff exposed a `check` method as a public Rust API. This method was used by few,
if any clients, and was not well documented or supported. As such, it has been removed, with
the intention of adding a stable public API in the future.

0.0.238

`select`, `extend-select`, `ignore`, and `extend-ignore` have new semantics ([2312](https://github.com/astral-sh/ruff/pull/2312))

Previously, the interplay between `select` and its related options could lead to unexpected
behavior. For example, `ruff --select E501 --ignore ALL` and `ruff --select E501 --extend-ignore ALL`
behaved differently. (See [2312](https://github.com/astral-sh/ruff/pull/2312) for more
examples.)

When Ruff determines the enabled rule set, it has to reconcile `select` and `ignore` from a variety
of sources, including the current `pyproject.toml`, any inherited `pyproject.toml` files, and the
CLI.

The new semantics are such that Ruff uses the "highest-priority" `select` as the basis for the rule
set, and then applies any `extend-select`, `ignore`, and `extend-ignore` adjustments. CLI options
are given higher priority than `pyproject.toml` options, and the current `pyproject.toml` file is
given higher priority than any inherited `pyproject.toml` files.

`extend-select` and `extend-ignore` are no longer given "top priority"; instead, they merely append
to the `select` and `ignore` lists, as in Flake8.

This change is largely backwards compatible -- most users should experience no change in behavior.
However, as an example of a breaking change, consider the following:

toml
[tool.ruff]
ignore = ["F401"]


Running `ruff --select F` would previously have enabled all `F` rules, apart from `F401`. Now, it
will enable all `F` rules, including `F401`, as the command line's `--select` resets the resolution.

`remove-six-compat` (`UP016`) has been removed ([2332](https://github.com/astral-sh/ruff/pull/2332))

The `remove-six-compat` rule has been removed. This rule was only useful for one-time Python 2-to-3
upgrades.

0.0.237

`--explain`, `--clean`, and `--generate-shell-completion` are now subcommands ([2190](https://github.com/astral-sh/ruff/pull/2190))

`--explain`, `--clean`, and `--generate-shell-completion` are now implemented as subcommands:

console
ruff . Still works! And will always work.
ruff check . New! Also works.

ruff --explain E402 Still works.
ruff rule E402 New! Also works. (And preferred.)

Oops! The command has to come first.
ruff --format json --explain E402 No longer works.
ruff --explain E402 --format json Still works!
ruff rule E402 --format json Works! (And preferred.)


This change is largely backwards compatible -- most users should experience
no change in behavior. However, please note the following exceptions:

- Subcommands will now fail when invoked with unsupported arguments, instead
of silently ignoring them. For example, the following will now fail:

console
ruff --clean --respect-gitignore


(the `clean` command doesn't support `--respect-gitignore`.)

- The semantics of `ruff <arg>` have changed slightly when `<arg>` is a valid subcommand.
For example, prior to this release, running `ruff rule` would run `ruff` over a file or
directory called `rule`. Now, `ruff rule` would invoke the `rule` subcommand. This should
only impact projects with files or directories named `rule`, `check`, `explain`, `clean`,
or `generate-shell-completion`.

- Scripts that invoke ruff should supply `--` before any positional arguments.
(The semantics of `ruff -- <arg>` have not changed.)

- `--explain` previously treated `--format grouped` as a synonym for `--format text`.
This is no longer supported; instead, use `--format text`.

0.0.226

`misplaced-comparison-constant` (`PLC2201`) was deprecated in favor of `SIM300` ([1980](https://github.com/astral-sh/ruff/pull/1980))

These two rules contain (nearly) identical logic. To deduplicate the rule set, we've upgraded
`SIM300` to handle a few more cases, and deprecated `PLC2201` in favor of `SIM300`.

0.0.225

`functools.cache` rewrites have been moved to a standalone rule (`UP033`) ([1938](https://github.com/astral-sh/ruff/pull/1938))

Previously, `UP011` handled both `functools.lru_cache()`-to-`functools.lru_cache` conversions,
_and_ `functools.lru_cache(maxsize=None)`-to-`functools.cache` conversions. The latter has been
moved out to its own rule (`UP033`). As such, some ` noqa: UP011` comments may need to be updated
to reflect the change in rule code.

0.0.222

`--max-complexity` has been removed from the CLI ([1877](https://github.com/astral-sh/ruff/pull/1877))

The McCabe plugin's `--max-complexity` setting has been removed from the CLI, for consistency with
the treatment of other, similar settings.

To set the maximum complexity, use the `max-complexity` property in your `pyproject.toml` file,
like so:

toml
[tool.ruff.mccabe]
max-complexity = 10

Page 27 of 28

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.