# python/mypy

Optional static typing for Python

Repository: https://github.com/python/mypy
Canonical: https://ross.abutalabs.com/products/mypy
Homepage: https://www.mypy-lang.org/
Language: Python
License: NOASSERTION
License Family: other
Topics: python, types, typing, typechecker, linter
Last push: 2026-08-25T10:25:46+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 5017, "days_push": 8, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 20605, forks 3278 (observed 2026-08-28T04:11:30.274755+00:00)

## What it is
Mypy is an optional static type checker for Python that validates type hints (PEP 484) in your code. It catches type errors before runtime while allowing gradual migration from dynamic to static typing.

## Use cases
- check python code for type errors before running it
- add type hints to an existing python codebase gradually
- catch bugs like passing wrong argument types to functions
- enforce type annotations in ci pipeline
- verify stub files for a python library
- find attribute errors and typos in large python projects

## When to choose
- you want compile-time-like type checking for python code
- you are migrating a dynamic python codebase to typed code incrementally
- you need to validate type hints against typeshed stubs
- you want machine-checked documentation via annotations

## When to avoid
- you need runtime type validation or enforcement rather than static analysis
- you want a general-purpose linter for style issues rather than type checking
- your code relies heavily on dynamic patterns mypy cannot infer

## Facets
- artifact type: library
- maturity: stable
- function: type-system, linter, developer-tools
- domain: developer-tools, programming-languages, testing
- platform: python, cli, cross-platform
- tags: static-analysis, type-checking, type-hints, pep-484, gradual-typing

## Member repositories
- python/mypy (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:30.274755+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:58:40.801204+00:00, confidence not recorded.
  - readme: https://github.com/python/mypy (fetched 2026-08-28T04:11:30.274755+00:00, sha 0d5c9e213cee)
  - homepage: https://www.mypy-lang.org/ (fetched 2026-08-29T07:57:17.974876+00:00, sha 9d43d9c187a0)
  - site_page: https://www.mypy-lang.org/about.html (fetched 2026-08-29T07:57:17.977719+00:00, sha 2e1e26112087)
- Data as of 2026-08-30T08:39:29.467469+00:00.
