Skip to content

Add mypy to pre-commit

Banuri Koushik Reddy requested to merge new-branch-name into feature-final

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.yaml
  • pyproject.toml
  • uv.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

  1. Sync the project dependencies:

    uv sync --all-extras
  2. Install pre-commit hooks if needed:

    pre-commit install
  3. Run the hooks against the repository:

    pre-commit run --all-files
  4. 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.

Edited by Banuri Koushik Reddy

Merge request reports

Loading