************************* Static Typing with Python ************************* Tutorials ========= .. Keep in sync with tutorials/index.rst. .. toctree:: :maxdepth: 1 tutorials/external_libraries Guides ====== .. Keep in sync with docs/guides/index.rst. .. toctree:: :maxdepth: 1 guides/libraries guides/writing_stubs guides/modernizing guides/unreachable guides/type_narrowing guides/typing_anti_pitch Reference ========= .. Keep in sync with docs/reference/index.rst. .. toctree:: :maxdepth: 1 reference/generics reference/protocols reference/best_practices reference/quality typing Module Documentation .. seealso:: The documentation at https://mypy.readthedocs.io/ is relatively accessible and complete. 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 forum `_ * `Developer mailing list (archived) `_ Typing-related Tools ==================== Type Checkers ------------- * `mypy `_, the reference implementation for type checkers. * `pyre `_, a type checker written in OCaml and optimized for performance. * `pyright `_, a type checker that emphasizes speed. * `pytype `_, a type checker that 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. * `ruff `_, a linter built for speed, with support for most of the ``flake8-pyi`` rules. Type-Hint and Stub Integration ------------------------------ * `autotyping `_, a tool which infers simple types from their context and inserts them as inline type-hints. * `merge-pyi `_, a thin wrapper around ``ApplyTypeAnnotationsVisitor`` from `libCST `_ that integrates .pyi signatures as inline type-hints in Python source code. Typing PEPs =========== See https://peps.python.org/topic/typing for a list of all typing-related PEPs.