# mypy

[**mypy**](https://github.com/python/mypy#readme) is a linter for Python.

You can enable the mypy linter with:

```shell
trunk check enable mypy
```

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

## Auto Enabling

mypy will be auto-enabled if any of its config files are present: *`mypy.ini`, `.mypy.ini`*.

## Settings

mypy supports the following config files:

* `mypy.ini`
* `.mypy.ini`

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.

## Links

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