# isort

[**isort**](https://pycqa.github.io/isort/) is a formatter for Python.

You can enable the isort formatter with:

```shell
trunk check enable isort
```

![isort example output](https://577236045-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F61Ep9MrYBkJa0Yq3zS1s%2Fuploads%2Fgit-blob-dfdb0968efea5e1902b1e8840aca7e3851d8bf97%2Fisort.gif?alt=media)

## Auto Enabling

isort will be auto-enabled if any *Python* files are present.

## Settings

isort supports the following config files:

* `.isort.cfg`

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

## Links

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