.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. .TH MYPY "1" "February 2017" "mypy 0.470" "User Commands" .SH NAME mypy \- Optional Static Typing for Python .SH DESCRIPTION usage: mypy [\-h] [\-v] [\-V] [\-\-python\-version x.y] [\-\-platform PLATFORM] [\-2] .IP [\-\-ignore\-missing\-imports] [\-\-follow\-imports {normal,silent,skip,error}] [\-\-disallow\-untyped\-calls] [\-\-disallow\-untyped\-defs] [\-\-check\-untyped\-defs] [\-\-disallow\-subclassing\-any] [\-\-warn\-incomplete\-stub] [\-\-warn\-redundant\-casts] [\-\-warn\-no\-return] [\-\-warn\-unused\-ignores] [\-\-show\-error\-context] [\-\-fast\-parser] [\-i] [\-\-cache\-dir DIR] [\-\-strict\-optional] [\-\-strict\-optional\-whitelist [GLOB [GLOB ...]]] [\-\-junit\-xml JUNIT_XML] [\-\-pdb] [\-\-show\-traceback] [\-\-stats] [\-\-inferstats] [\-\-custom\-typing MODULE] [\-\-custom\-typeshed\-dir DIR] [\-\-scripts\-are\-modules] [\-\-config\-file CONFIG_FILE] [\-\-show\-column\-numbers] [\-\-find\-occurrences CLASS.MEMBER] [\-\-cobertura\-xml\-report DIR] [\-\-html\-report DIR] [\-\-linecount\-report DIR] [\-\-linecoverage\-report DIR] [\-\-memory\-xml\-report DIR] [\-\-old\-html\-report DIR] [\-\-txt\-report DIR] [\-\-xml\-report DIR] [\-\-xslt\-html\-report DIR] [\-\-xslt\-txt\-report DIR] [\-m MODULE] [\-c PROGRAM_TEXT] [\-p PACKAGE] [files [files ...]] .SS "optional arguments:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-v\fR, \fB\-\-verbose\fR more verbose messages .TP \fB\-V\fR, \fB\-\-version\fR show program's version number and exit .TP \fB\-\-python\-version\fR x.y use Python x.y .TP \fB\-\-platform\fR PLATFORM typecheck special\-cased code for the given OS platform (defaults to sys.platform). .TP \fB\-2\fR, \fB\-\-py2\fR use Python 2 mode .TP \fB\-\-ignore\-missing\-imports\fR silently ignore imports of missing modules .TP \fB\-\-follow\-imports\fR {normal,silent,skip,error} how to treat imports (default normal) .TP \fB\-\-disallow\-untyped\-calls\fR disallow calling functions without type annotations from functions with type annotations .TP \fB\-\-disallow\-untyped\-defs\fR disallow defining functions without type annotations or with incomplete type annotations .TP \fB\-\-check\-untyped\-defs\fR type check the interior of functions without type annotations .TP \fB\-\-disallow\-subclassing\-any\fR disallow subclassing values of type 'Any' when defining classes .TP \fB\-\-warn\-incomplete\-stub\fR warn if missing type annotation in typeshed, only relevant with \fB\-\-check\-untyped\-defs\fR enabled .TP \fB\-\-warn\-redundant\-casts\fR warn about casting an expression to its inferred type .TP \fB\-\-warn\-no\-return\fR warn about functions that end without returning .TP \fB\-\-warn\-unused\-ignores\fR warn about unneeded '# type: ignore' comments .TP \fB\-\-show\-error\-context\fR Precede errors with "note:" messages explaining context .TP \fB\-\-fast\-parser\fR enable fast parser (recommended except on Windows) .TP \fB\-i\fR, \fB\-\-incremental\fR enable experimental module cache .TP \fB\-\-cache\-dir\fR DIR store module cache info in the given folder in incremental mode (defaults to '.mypy_cache') .TP \fB\-\-strict\-optional\fR enable experimental strict Optional checks .TP \fB\-\-strict\-optional\-whitelist\fR [GLOB [GLOB ...]] suppress strict Optional errors in all but the provided files (experimental \fB\-\-\fR read documentation before using!). Implies \fB\-\-strict\-optional\fR. Has the undesirable side\-effect of suppressing other errors in non\-whitelisted files. .TP \fB\-\-junit\-xml\fR JUNIT_XML write junit.xml to the given file .TP \fB\-\-pdb\fR invoke pdb on fatal error .TP \fB\-\-show\-traceback\fR, \fB\-\-tb\fR show traceback on fatal error .TP \fB\-\-stats\fR dump stats .TP \fB\-\-inferstats\fR dump type inference stats .TP \fB\-\-custom\-typing\fR MODULE use a custom typing module .TP \fB\-\-custom\-typeshed\-dir\fR DIR use the custom typeshed in DIR .TP \fB\-\-scripts\-are\-modules\fR Script x becomes module x instead of __main__ .TP \fB\-\-config\-file\fR CONFIG_FILE Configuration file, must have a [mypy] section (defaults to mypy.ini) .TP \fB\-\-show\-column\-numbers\fR Show column numbers in error messages .TP \fB\-\-find\-occurrences\fR CLASS.MEMBER print out all usages of a class member (experimental) .SS "report generation:" .IP Generate a report in the specified format. .HP \fB\-\-cobertura\-xml\-report\fR DIR .HP \fB\-\-html\-report\fR DIR .HP \fB\-\-linecount\-report\fR DIR .HP \fB\-\-linecoverage\-report\fR DIR .HP \fB\-\-memory\-xml\-report\fR DIR .HP \fB\-\-old\-html\-report\fR DIR .HP \fB\-\-txt\-report\fR DIR .HP \fB\-\-xml\-report\fR DIR .HP \fB\-\-xslt\-html\-report\fR DIR .HP \fB\-\-xslt\-txt\-report\fR DIR .SS "How to specify the code to type check:" .TP \fB\-m\fR MODULE, \fB\-\-module\fR MODULE type\-check module; can repeat for more modules .TP \fB\-c\fR PROGRAM_TEXT, \fB\-\-command\fR PROGRAM_TEXT type\-check program passed in as string .TP \fB\-p\fR PACKAGE, \fB\-\-package\fR PACKAGE type\-check all files in a directory .TP files type\-check given files or directories .PP environment variables: MYPYPATH additional module search path