mrkeyoor.com_
Sun 13 Sept 17:40 UTC
Dev Toolsevaluationupdated 13 Sept 2026

mypy review

Mypy is a static type checker that finds mismatched Python values and function calls before the program runs. It lets teams add type hints gradually, so an existing dynamic codebase can gain earlier feedback without being rewritten all at once.

trackingstars / 7d
Verdict

The build completed in 5 seconds, but the test suite did not finish within our 900-second cap. Mypy remains an easy recommendation for Python teams that want gradual, configurable static checking and are prepared to treat annotations as maintained code. Adopt it incrementally and pin its behavior in CI, but budget time for a much longer upstream validation run if you are developing mypy itself.

We ran it

Install✓ · 75s56 packages · 71 MB
Build✓ · 5s
Tests✗ timed out · 900sran, no count parsed
Known vulns0(pip-audit)
Repo1922 files~244,260 lines of source · 20.3 MB · 7 CI workflows

Answers from our run

Does mypy build from source?

Dependencies installed in 75 seconds (56 packages), and the build succeeded in 5 seconds. We cloned commit 75b6d3c into a clean Debian container with 3 CPUs and no project-specific setup.

Do mypy's tests pass?

We could not finish them: the suite was still running after 15 minutes in our container.

Does mypy have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use mypy?

Teams unwilling to maintain annotations, configuration, and third-party type coverage

What are the alternatives to mypy?

Pyright, Pyre, pytype. The build completed in 5 seconds, but the test suite did not finish within our 900-second cap.

Setup4/5Install worked in 75s; full source tests exceeded 900s
Docs5/5Clear quick start, cheat sheet, error codes, and integration guides
Community4/520,638 stars and a same-day push, but 3,237 open issues
Maturity5/5Established since 2012 with broad tooling integration

Who it’s for

Python teams that want type errors caught in local development or CI
Maintainers gradually adding annotations to an existing codebase
Large projects that can benefit from daemon-based incremental checking
Developers who want a mature checker with editor and pre-commit integrations

Who it’s NOT for

Teams unwilling to maintain annotations, configuration, and third-party type coverage
Tiny scripts where checker setup costs more than the likely benefit
Developers expecting type hints to enforce behavior at runtime
CI pipelines that require the upstream test suite to finish inside a strict 15-minute validation window

Setup reality

Our run installed successfully in 75 seconds, adding 56 packages and using 71 MB, and the build then succeeded in 5 seconds. The test suite did not finish within the 900-second cap, although its final output had reached 97%, so we cannot call the tests passing. That is more validation effort than the README's one-command pip quick start suggests, but using the published tool should still be straightforward: the heavier friction appeared when validating the source checkout, not during installation. Pip-audit found 0 known vulnerabilities in the installed environment.

It brings compile-time-style feedback to gradual Python

Mypy addresses a familiar Python problem: many mistakes surface only when a particular path runs. It reads PEP 484 type hints and checks how values, functions, and containers are used without executing the program. The important design choice is gradual typing. A team can annotate a risky module or public interface first, leave other code dynamic, and expand coverage as the payoff becomes clear. That makes it useful in mature codebases where an all-at-once type conversion would be unrealistic.

The project has substantial history and adoption. The repository was created in 2012 and has 20,638 GitHub stars, while its README points newcomers to a getting-started guide, cheat sheet, common-issues page, and catalog of error codes. It also directs general typing questions to the broader Python typing discussions and type-system proposals to discuss.python.org. That separation is healthy: mypy is an implementation, while Python typing rules are a wider ecosystem concern.

Our build worked, but the test run remained incomplete

Our run used commit 75b6d3c in an unprivileged Debian container with 3 CPUs and 8 GB of RAM. Installation succeeded in 75 seconds, bringing in 56 packages and occupying 71 MB. The source build succeeded in another 5 seconds. Those results support the README's basic claim that getting mypy installed is uncomplicated, although building and validating a checkout naturally involves more than the published python3 -m pip install -U mypy command.

The test suite timed out at the 900-second limit. Its last output had advanced through 92%, 93%, 94%, 95%, and 96% before reaching 97%, where the captured log ended after more progress dots. It also displayed xx, but the excerpt provides no explanation for those markers, so we will not assign them a cause. The right conclusion is narrow: many tests executed, but our run did not establish a passing suite. It would be misleading to turn 97% progress into a pass rate because the log gives no test totals.

The checkout was sizable: 1,922 files, about 244,260 lines of source, and 20.3 MB on disk. Repository inspection found 7 CI workflow files, no Dockerfile, and no conventional tests directory. Pip-audit reported 0 known vulnerabilities in the installed environment. None of that proves future dependency safety, but it is a useful clean result for this specific snapshot. The missing Dockerfile means contributors should expect to create their own reproducible container setup if that is part of their workflow.

Gradual adoption is its strongest practical feature

Mypy does not require annotations to change how Python executes, and it permits falling back to dynamic typing where static descriptions become awkward. That is its most practical advantage. Teams can begin at boundaries where mistakes are expensive, such as service interfaces or shared libraries, then tighten checking over time. Within the PEP 484 model, the supported concepts listed in the README include inference, generics, callable types, tuples, unions, and structural subtyping, enough range for ordinary application code as well as reusable libraries.

For larger repositories, the documented dmypy daemon offers incremental updates that the project describes as often sub-second. We did not benchmark daemon mode, so that figure belongs to the project's documentation rather than our measurements. Integration options cover VS Code, Vim through Syntastic or ALE, Emacs through Flycheck, Sublime Text, PyCharm, IDLE, and pre-commit. This breadth makes mypy easier to place where developers already work instead of confining feedback to a distant CI job.

The compiled distribution is another concrete engineering choice. The README says mypy is compiled with mypyc and is approximately 4 times faster than an interpreted build, while still documenting how to request the interpreted package with pip. Again, we did not independently benchmark that speed claim. More importantly, the project explains the choice and exposes both installation paths, which is the kind of operational clarity mature development tools should provide.

Type coverage still creates ongoing work

Mypy can find errors only where available annotations and configuration give it enough information. Third-party libraries with incomplete typing, dynamically generated APIs, and metaprogramming-heavy code can create gaps or require local accommodations. The README itself warns that the default pre-commit mirror can limit analysis of third-party dependencies. Teams should therefore treat a green mypy run as one quality signal, not proof that a Python program is correct. Runtime tests remain essential.

The issue tracker count is also hard to ignore: 3,237 issues were open in the supplied snapshot. That number can reflect both a widely used project and a large maintenance surface, and the data does not tell us response times or how many reports are actionable. On the positive side, the repository was pushed on 2026-09-13, the same date as our review, so development is plainly active. No latest release was listed in the supplied metadata, which means we cannot responsibly judge release cadence from this dataset alone or treat the missing field as abandonment.

It belongs in the feedback loop, beside tests and linting

In a real stack, run mypy locally through the editor or daemon, then enforce an agreed configuration in CI alongside tests, formatting, linting, and security checks. Start with a limited package or a permissive baseline, record the exceptions, and make stricter checks an intentional migration. For library authors, checking exported interfaces can improve the experience of downstream users. For application teams, focus first on modules where data crosses boundaries or where refactors frequently break assumptions.

Developing mypy itself is a different commitment from adopting its released package. Our 75-second install and 5-second build were approachable, but a test run exceeding 900 seconds requires a roomier contributor workflow than the quick start conveys. As an everyday checker, though, mypy earns its place through gradual rollout, deep documentation, and broad tool integration. Choose an alternative when its editor model or inference behavior better matches your team, not because mypy lacks maturity.

Alternatives

ProjectWhat it isPick it when
PyrightA fast Python type checker and language server with strong editor-oriented workflows.Pick this instead when responsive IDE feedback and a language-server-centered setup matter most.
PyreA Python type checker designed around incremental analysis of sizable codebases.Pick this instead when your team already fits Pyre's configuration and incremental-analysis model.
pytypeA static analyzer that checks Python types and can infer them from existing code.Pick this instead when inference over lightly annotated code is the central requirement.

What people are saying

  1. [velocity-scout] python/mypy

Sources

  1. mypy GitHub repository
  2. mypy homepage

More dev tools reviews

Kingfisher · act · ligolo-ng · stremio-core · cool-retro-term · agent-skills · the whole board →