************************* Static Typing with Python ************************* .. Introduction .. ============ .. .. .. toctree:: .. :maxdepth: 2 .. .. source/introduction Guides ====== .. toctree:: :maxdepth: 2 source/guides Reference ========= .. toctree:: :maxdepth: 2 source/reference .. seealso:: 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 ============= .. toctree:: :maxdepth: 2 spec/index Indices and tables ================== * :ref:`genindex` * :ref:`search` .. _contact: Discussions and Support ======================= * `User help forum `_ * `User chat on Gitter `_ * `Developer mailing list `_ Typing-related Tools ==================== 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.