Continuous Integration
Once you have a clean mypy run and a runner script for a partof your codebase, set up your Continuous Integration (CI) system torun mypy to ensure that developers won’t introduce bad annotations.A simple CI script could look something like this:
- python3 -m pip install mypy==0.600 # Pinned version avoids surprises
- scripts/mypy # Runs with the correct options