Skip to content

Add ty check - #1003

Open
besendorf wants to merge 3 commits into
mvt-project:mainfrom
besendorf:add-ty-check
Open

besendorf wants to merge 3 commits into
mvt-project:mainfrom
besendorf:add-ty-check

Conversation

@besendorf

Copy link
Copy Markdown
Collaborator

Motivation

"ty" (https://github.com/astral-sh/ty) is a fast Python type checker developed by Astral, the maintainers of Ruff and uv, both of which MVT already uses. With the release of ty 1.0, it is worth evaluating as a potential replacement for mypy.

Beyond significantly faster type checking, ty offers improved type inference, better typing specification conformance, and native language server support. Its ability to analyze partially annotated code is particularly relevant to MVT, where many existing forensic modules are not fully typed.

Given the security-sensitive nature of MVT and its use in digital forensic investigations, improved static analysis could help identify programming errors that might otherwise result in incomplete or incorrect analysis.

This PR introduces ty alongside mypy rather than replacing it immediately. Initially running ty as a non-blocking CI check allows us to evaluate its diagnostics, identify genuine issues, assess false positives, and address existing typing problems without disrupting development.

Once the findings have been evaluated, we can decide whether to enforce ty in CI and eventually replace mypy, reducing tooling complexity and improving developer feedback times.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant