mypy man page

mypy — manual page for mypy 0.4.3-dev

Description

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
--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
--warn-incomplete-stub
warn if missing type annotation in typeshed, only relevant with --check-untyped-defs enabled
--warn-redundant-casts
warn about casting an expression to its inferred type
--warn-unused-ignores
warn about unneeded '# type: ignore' comments
--fast-parser
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')
--strict-optional
enable experimental strict Optional checks
-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 MODULE, --module MODULE
type-check module; can repeat for more modules
-c PROGRAM_TEXT, --command PROGRAM_TEXT
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

Info

July 2016 mypy 0.4.3-dev User Commands