Verification · Static analysis · Type checking
Gradual typing
Type-check annotated code first and tighten strictness per module.
How to build it
- Enable type checking for the modules that already have annotations.
- Set per-module strictness, such as [[tool.mypy.overrides]] or per-file pyright strict comments.
- Raise strictness for each module once it is annotated and record the list in config.
Signals in a repository
- A [tool.mypy] section with overrides for selected modules in pyproject.toml.
- A pyright configuration or '# pyright: strict' comments in some source files.
In practice
44 repositories run a tool for this check in the scanned set.
mypy· 35 repospyright· 16 repos
Examples
-
langflow-ai/langflow ·
mypymypy --namespace-packages -p langflow -
fastapi/fastapi ·
mypymypy fastapi -
home-assistant/core ·
mypymypy --num-workers=4 homeassistant packages/pylint-home-assistant -
python/cpython ·
mypymypy --num-workers 4 --config-file $EXPR/mypy.ini -
pallets/flask ·
mypymypy