Platform configuration Platform configuration python_version (string) Specifies the Python version used to parse and check the targetprogram. The string should be in the form...
Import discovery Import discovery The following flags customize how exactly mypy discovers and followsimports. —namespace-packages This flag enables import discovery to us...
Per-module and global options Per-module and global options Some of the config options may be set either globally (in the [mypy] section)or on a per-module basis (in sections ...
Introduce stricter options Introduce stricter options Mypy is very configurable. Once you get started with static typing,you may want to explore the variousstrictness options m...
Frequently Asked Questions Frequently Asked Questions Why have both dynamic and static typing? Would my project benefit from static typing? Can I use mypy to type check my e...
Python version and system platform checks Python version and system platform checks Mypy supports the ability to perform Python version checks and platformchecks (e.g. Windows ...
Library stubs and typeshed Library stubs and typeshed Mypy uses library stubs to type check code interacting with librarymodules, including the Python standard library. A libra...
Examples Examples Here is an example of a mypy.ini file. To use this config file, place it at the rootof your repo and run mypy. # Global options: [ mypy ] python_versio...
Config file Config file —config-file CONFIG_FILE This flag makes mypy read configuration settings from the given file. By default settings are read from mypy.ini or setup...