mypy man page

mypy — manual page for mypy 0.4.3-dev


usage: mypy [-h] [-v] [-V] [--python-version x.y] [--py2] [-s] [--silent]

[--almost-silent] [--disallow-untyped-calls] [--disallow-untyped-defs] [--check-untyped-defs] [--warn-incomplete-stub] [--warn-redundant-casts] [--warn-unused-ignores] [--fast-parser] [-i] [--cache-dir DIR] [--strict-optional] [-f] [--pdb] [--use-python-path] [--stats] [--inferstats] [--custom-typing MODULE] [--html-report DIR] [--old-html-report DIR] [--xslt-html-report DIR] [--xml-report DIR] [--txt-report DIR] [--xslt-txt-report DIR] [--linecount-report DIR] [-m MODULE] [-c PROGRAM_TEXT] [-p PACKAGE] [files [files ...]]

optional arguments

-h, --help
show this help message and exit
-v, --verbose
more verbose messages
-V, --version
show program's version number and exit
--python-version x.y
use Python x.y
use Python 2 mode
-s, --silent-imports
don't follow imports to .py files
deprecated name for --silent-imports
like --silent-imports but reports the imports as errors
disallow calling functions without type annotations from functions with type annotations
disallow defining functions without type annotations or with incomplete type annotations
type check the interior of functions without type annotations
warn if missing type annotation in typeshed, only relevant with --check-untyped-defs enabled
warn about casting an expression to its inferred type
warn about unneeded '# type: ignore' comments
enable experimental fast parser
-i, --incremental
enable experimental module cache
--cache-dir DIR
store module cache info in the given folder in incremental mode (defaults to '.mypy_cache')
enable experimental strict Optional checks
-f, --dirty-stubs
don't warn if typeshed is out of sync
invoke pdb on fatal error
an anti-pattern
dump stats
dump type inference stats
--custom-typing MODULE
use a custom typing module

report generation

Generate a report in the specified format.

--html-report DIR

--old-html-report DIR

--xslt-html-report DIR

--xml-report DIR

--txt-report DIR

--xslt-txt-report DIR

--linecount-report DIR

How to specify the code to type check

-m MODULE, --module MODULE
type-check module; can repeat for more modules
type-check program passed in as string
-p PACKAGE, --package PACKAGE
type-check all files in a directory
type-check given files or directories

environment variables: MYPYPATH additional module search path


mypy 0.4.3-dev July 2016