> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Ruff

> Discover Ruff, a speedy Python linter for large codebases. Integrates with CI/IDEs and supports .py, .pyi, and Jupyter Notebooks.

[**Ruff**](https://github.com/astral-sh/ruff) is a linter for Python.

ruff is composed of several linter commands.

`ruff` is for formatting general python code.

You can enable the `ruff` linter with:

```shell theme={null}
trunk check enable ruff
```

`ruff-nbqa` is for extra support for Jupyter notebooks.

You can enable the `ruff-nbqa` linter with:

```shell theme={null}
trunk check enable ruff-nbqa
```

## Auto Enabling

Ruff will be auto-enabled if any *Python, Python-interface, Jupyter, Python, Python-interface, Python, Python-interface, Python, Python-interface, Python or Python-interface* files are present.

## Settings

Ruff supports the following config files:

* `ruff.toml`

You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linters](../configure-linters#moving-linters) for more info. Trunk Code Quality provides a default `ruff.toml` if your project does not already have one.

## Links

* [Ruff site](https://github.com/astral-sh/ruff)
* Ruff Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/ruff)
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
