# python/ruff-format

> Checks the layout of every Python file against the Ruff formatter.

Checks the layout of every Python file against the Ruff formatter.

Part of the [`python`](/reference/configurations/python/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), per file. It runs ruff. `gspot check --fix` fixes what it can.

## Why

One layout everywhere keeps a diff about the change.

## What to do

Run `gspot check --fix`.

## Example

`value=1` differs from the Ruff output. Run `gspot check --fix` to get `value = 1`.

## Turn it off

Turn it off for some files, or one of its lint rules, with a reason:

```shell
gspot ignore python/ruff-format --paths "<glob>" --reason "<why>"
gspot ignore python/ruff-format --rule <rule> --reason "<why>"
```

To silence one place, write a comment such as:

```text
import plugins  # noqa: F401 # the module registers its plugins on import
```
