mypy(1) Optional Static Typing for Python

DESCRIPTION

usage: mypy [-h] [-v] [-V] [--python-version x.y] [--py2] [-s] [--silent]
[--almost-silent] [--disallow-untyped-calls] [--disallow-untyped-defs] [--check-untyped-defs] [--fast-parser] [-i] [-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 MODULES] [-c COMMAND] [-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
--py2
use Python 2 mode
-s, --silent-imports
don't follow imports to .py files
--silent
deprecated name for --silent-imports
--almost-silent
like --silent-imports but reports the imports as errors
--disallow-untyped-calls
disallow calling functions without type annotations from functions with type annotations
--disallow-untyped-defs
disallow defining functions without type annotations or with incomplete type annotations
--check-untyped-defs
type check the interior of functions without type annotations
--fast-parser
enable experimental fast parser
-i, --incremental
enable experimental module cache
-f, --dirty-stubs
don't warn if typeshed is out of sync
--pdb
invoke pdb on fatal error
--use-python-path
an anti-pattern
--stats
dump stats
--inferstats
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 MODULES, --module MODULES
type-check module; can repeat for more modules
-c COMMAND, --command COMMAND
type-check program passed in as string
-p PACKAGE, --package PACKAGE
type-check all files in a directory
files
type-check given files or directories

environment variables: MYPYPATH additional module search path