> ## 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.

# isort

> isort is a Python utility for sorting imports alphabetically and automatically separating them into sections and by type.

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

You can enable the isort formatter with:

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

<Frame caption="isort example output">
  <img src="https://mintcdn.com/trunk-4cab4936/WAR0qJ1WO0rtUlqz/assets/code-quality/overview/linters/supported/isort.gif?s=236999ca44c095c7cc5dc1b837dff86a" alt="isort example output" width="1000" height="600" data-path="assets/code-quality/overview/linters/supported/isort.gif" />
</Frame>

## 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](../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)
