Contents Menu Expand Light mode Dark mode Auto light/dark mode
mypy 1.3.0+dev.da7268c3af04686f70905750c5d58144f6e6d049.dirty documentation
Logo
mypy 1.3.0+dev.da7268c3af04686f70905750c5d58144f6e6d049.dirty documentation

First steps

  • Getting started
  • Type hints cheat sheet
  • Using mypy with an existing codebase

Type system reference

  • Built-in types
  • Type inference and type annotations
  • Kinds of types
  • Class basics
  • Annotation issues at runtime
  • Protocols and structural subtyping
  • Dynamically typed code
  • Type narrowing
  • Duck type compatibility
  • Stub files
  • Generics
  • More types
  • Literal types and Enums
  • TypedDict
  • Final names, methods and classes
  • Metaclasses

Configuring and running mypy

  • Running mypy and managing imports
  • The mypy command line
  • The mypy configuration file
  • Inline configuration
  • Mypy daemon (mypy server)
  • Using installed packages
  • Extending and integrating mypy
  • Automatic stub generation (stubgen)
  • Automatic stub testing (stubtest)

Miscellaneous

  • Common issues and solutions
  • Supported Python features
  • Error codes
  • Error codes enabled by default
  • Error codes for optional checks
  • Additional features
  • Frequently Asked Questions

Project Links

  • GitHub
  • Website
  v: latest
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds
Back to top
Copyright © 2012-2022 Jukka Lehtosalo and mypy contributors
Made with Sphinx and @pradyunsg's Furo