Skip to content

Latest commit

 

History

History
103 lines (75 loc) · 2.73 KB

index.rst

File metadata and controls

103 lines (75 loc) · 2.73 KB

Static Typing with Python

Guides

source/guides

Reference

source/reference

The documentation at https://mypy.readthedocs.io/ is relatively accessible and complete. Particularly refer to the "Type System Reference" section of the docs -- since the Python typing system is standardised via PEPs, this information should apply to most Python type checkers.

Specification

spec/index

Indices and tables

  • genindex
  • search

Discussions and Support

Type Checkers

  • mypy, the reference implementation for type checkers.
  • pyre, written in OCaml and optimized for performance.
  • pyright, a type checker that emphasizes speed.
  • pytype, checks and infers types for unannotated code.

Development Environments

  • PyCharm, an IDE that supports type stubs both for type checking and code completion.
  • Visual Studio Code, a code editor that supports type checking using mypy, pyright, or the Pylance extension.

Linters and Formatters

  • black, a code formatter with support for type stub files.
  • flake8-pyi, a plugin for the flake8 linter that adds support for type stubs.

Type-Hint and Stub Integration

  • autotyping, a tool which infers simple types from their context and inserts them as inline type-hints.
  • merge_pyi, integrates .pyi signatures as inline type-hints in Python source code. This is a thin wrapper around ApplyTypeAnnotationsVisitor from libCST.

Typing PEPs

See https://peps.python.org/topic/typing for a list of all typing-related PEPs.