Project Awesome project awesome

Python > Typing

Optional static typing for Python.

Collection 2.0k stars GitHub

Tools

Helper tools to add annotations to existing code

pytype annotate-ast 5.0k updated 9d ago

A work-in-progress tool to annotate the nodes of an AST with their Python types.

autotyping 283 updated 6mo ago

Automatically add simple return type annotations for functions (bool, None, Optional).

infer-types 99 updated 3y ago

CLI tool to automatically infer and add type annotations into Python code.

jsonschema-gentypes 48 updated 2d ago

Generate Python types based on TypedDict from a JSON Schema.

monkeytype 5.0k updated 1mo ago

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.

no_implicit_optional 107 updated 2y ago

A codemod to make your implicit optional type hints PEP 484 compliant.

pyannotate 1.4k updated 3y ago

Insert annotations into your source code based on call arguments and return types observed at runtime.

PyTypes 11 updated 3y ago

Infer Types by Python Tracing.

pyre infer 7.1k updated 2d ago

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.

pytest-annotate 113 updated 3y ago

Pyannotate plugin for pytest.

pytest-monkeytype 46 updated 5y ago

MonkeyType plugin for pytest.

RightTyper 352 updated 12d ago

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.

type4py 65 updated 2y ago

Deep Similarity Learning-Based Type Inference.

typilus 62 updated 3y ago

A deep learning algorithm for predicting types in Python. Also available as a GitHub action

auto-optional 18 updated 8mo ago

Makes typed arguments Optional when the default argument is None.