# Type Checking with Mypy

> Enable static type checking in your Pegasus project using mypy and django-stubs.

Experimental Feature

This feature is experimental. It is likely (but not guaranteed) that it will make it into a future Pegasus release. While in the experimental phase, it may undergo significant changes, including breaking changes.

Pegasus includes optional support for static type checking using [mypy](https://mypy-lang.org/) and [django-stubs](https://github.com/typeddjango/django-stubs). When enabled, type checking runs automatically in GitHub Actions CI.

*This feature is currently marked as experimental because not every combination of Pegasus features has been fully tested by mypy. However, most common configurations are tested and should work out of the box. However, enabling type checking is perfectly safe.*

## Enabling Type Checking

[Section titled “Enabling Type Checking”](#enabling-type-checking)

Type checking can be enabled from your project’s configuration page under “Developer Setup” -> “Advanced”. When enabled, your project will include:

* `mypy`, `django-stubs`, and other stub libraries as development dependencies
* A mypy configuration in your `pyproject.toml`
* Type checking in the GitHub Actions CI workflow
* Additional guidelines in AI skills files for working with types

## Running Type Checks

[Section titled “Running Type Checks”](#running-type-checks)

To run type checking locally:

```bash