MyPy adoption checklist

Use this checklist to expand Django-aware MyPy coverage in a monotonic way.

Stable baseline first

The current MyPy-owned paths are recorded in pyproject.toml under [tool.mypy].files so coverage only grows by explicit review:

  • scripts/generate_requirements.py
  • scripts/sort_pyproject_deps.py
  • apps/protocols/
  • apps/repos/github.py
  • apps/repos/services/github.py
  • apps/core/services/health.py
  • apps/core/services/health_checks.py
  • apps/core/modeling/
  • apps/core/system_ui.py
  • apps/core/system/ui/formatting.py
  • apps/core/system/ui/network_probe.py
  • apps/core/system/ui/services.py
  • apps/core/system/ui/uptime.py

Django-aware checking is enabled through the mypy_django_plugin.main plugin with config.settings as the settings module. Use the same environment assumptions as scripts/run_mypy.sh when invoking MyPy directly:

  • DJANGO_SETTINGS_MODULE=config.settings
  • DJANGO_SECRET_KEY=mypy-secret-key
  • ARTHEXIS_DISABLE_CELERY=1
  • CELERY_LOG_LEVEL=WARNING
  • DEBUG=0

That keeps MyPy aligned with the canonical Django settings package without maintaining a dedicated shim module. Keep new ownership additions small enough that mypy stays green before adding the next path.

Loading remaining sections…