Python > Typing
Optional static typing for Python.
Contents
Static type checkers
Pyright fork with improvements to VSCode support and various other fixes.
A fast static code analyzer & language server for Python, written in Rust.
Tools
Mypy plugins
Helper tools to add annotations to existing code
A work-in-progress tool to annotate the nodes of an AST with their Python types.
Automatically add simple return type annotations for functions (bool, None, Optional).
CLI tool to automatically infer and add type annotations into Python code.
Collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type annotations directly to your code based on the types collected at runtime.
A codemod to make your implicit optional type hints PEP 484 compliant.
Insert annotations into your source code based on call arguments and return types observed at runtime.
Pyre has a powerful feature for migrating codebases to a typed format. The infer command-line option ingests a file or directory, makes educated guesses about the types used, and applies the annotations to the files.
A tool that generates types for your function arguments and return values. RightTyper lets your code run at nearly full speed with almost no memory overhead.
Plugin for flake8 to validate annotations complexity.
Plugin for flake8 to check for presence of type annotations in function definitions.
Plugin for Flake8 that provides specializations for type hinting stub files.
Plugin to help you guard any type-annotation-only import correctly.
Plugin which checks that typing imports are properly guarded.
flake8 plugin that helps identify which imports to put into type-checking blocks, and how to adjust your type annotations once imports are moved.
The strictest and most opinionated Python linter ever.
Dynamic type checkers
Stub packages
ASGI specification, provides asgiref.typing module with type annotations for ASGI servers.
Type stubs for Celery and its related packages django-celery-results, ampq, kombu, billiard, vine and ephem.