Add mypy to pre-commit
What does this MR do and why?
This MR adds mypy to the local pre-commit workflow so type-checking runs automatically before commits.
It also updates the Python dev dependencies and lockfile to support the new hook, including the types-python-dateutil stub package required by existing dateutil imports.
This helps catch type-related issues earlier in local development and keeps the pre-commit checks aligned with the repository’s quality tooling.
References
mypy.ini.pre-commit-config.yamlpyproject.tomluv.lock
Screenshots or screen recordings
Not applicable. This MR only updates development tooling and does not change the UI.
| Before | After |
|---|---|
pre-commit ran Ruff and file-quality hooks only |
pre-commit now also runs mypy type checks |
How to set up and validate locally
-
Sync the project dependencies:
uv sync --all-extras -
Install pre-commit hooks if needed:
pre-commit install -
Run the hooks against the repository:
pre-commit run --all-files -
Optionally run mypy directly:
uv run mypy --config-file mypy.ini .
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.