Python Static Type Checking

Parent: Programming Languages · researched 2026-06-01T02:46:59.407Z· 14 sources · 11 concepts · skill python-static-type-checking

> Reference file — part of the programming-languages hub. Authored via /dr (deep-research). Not a standalone skill.

Overview

Python Static Type Checking — mypy, Pyright, ty, Pyrefly

1. Shared foundation: gradual typing

2. The four checkers

3. Inference divergence (the key behavioral difference)

4. mypy (reference impl)

5. Pyright (conservative, IDE-first)

6. ty (Astral, beta)

7. Pyrefly (Meta, stable 1.0.0)

8. Choosing

9. Migrating an untyped codebase

10. Anti-patterns

11. Troubleshooting

References

Children

Frontier under this node: Astral ty (Rust, Salsa incremental, intersection/negation types, beta 0.x), Checker selection (existing vs new project, IDE, CI gate), Gradual typing model (PEP 483/484, Any, the gradual guarantee), Inference divergence (list[int] vs list[Unknown]), Meta Pyrefly (Rust, Pyre successor, pyrefly infer, stable 1.0.0), Migrating an untyped codebase (ratchet strictness, per-module overrides), Pyright (five strictness levels, reportXxx, Pylance, BasedPyright), Type distribution (PEP 561, py.typed, types-* stub packages, typeshed), Type-checker anti-patterns (Any creep, blanket type: ignore, runtime-enforcement assumption), mypy (reference impl, --strict, plugins, mypy.ini/[tool.mypy]), typing-spec conformance suite

← the whole tree · 3D view· how to read this page