Skip to content

[FEATURE] from mypy to ty #219

Description

@mdevolde

Change type checker from mypy to ty

Problem or motivation

It would be relevant to change the type checker from mypy to ty, as our project is developped with uv, built with uv_build, and linted with ruff. Integrating ty in this linting stack would be the next logical step, to have a well integreted type checker with the rest of our stack (all maintained by Astral).
It would be relevant to integrate ty when he becomes stable (currently in 0.0.x version, and not widely adopted).

Proposed solution

Replace mypy conf in pyproject.toml by ty conf, and replace mypy in quality group dependencies by ty (with a fixed version), apply uv lock, replace mypy in pre-commit-config by ty, replace mypy in Makefiles and github actions by ty, patch potential new ty warnings (and check if current type ignore comments are relevant with ty).

Alternatives considered

  • Keep mypy: mature, reliable but inconsistent with the rest of our toolchain.

Additional context

https://docs.astral.sh/ty/

Metadata

Metadata

Assignees

Labels

enhancementIssue or pull request about a new feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions