All apps/mypy

mypy

mypy

Mypy is a static type checker for Python.

Runs as mypy, dmypy|macOS, Linux, Windows|mypy-lang.org

Autocomplete

Fig spec, with what the manifest adds · 84 options
Published once and never changed; check the digest before caching
sha256
c7e32d18a930534268520b45dbb40014cf96839ddddba2df95a5709693a579c4
Size
15787 bytes
OptionsOn mypy itself
--module
Asks mypy to type check the provided module
--package
Asks mypy to type check the provided package
--command
Asks mypy to type check the provided string as a program
--exclude
A regular expression that matches file names, directory names and paths which mypy should ignore while recursively discovering files to check
--help
Show help message and exit
--verbose
More verbose messages
--version
Show program's version number and exit
--config-file
This flag makes mypy read configuration settings from the given file
--warn-unused-configs
This flag makes mypy warn about unused [mypy-<pattern>] config file sections
--explicit-package-bases
This flag tells mypy that top-level packages will be based in either the current directory, or a member of the MYPYPATH environment variable
--ignore-missing-imports
This flag makes mypy ignore all missing imports
silent
This flag adjusts how mypy follows imported modules that were not explicitly passed in via the command line
--python-executable
This flag will have mypy collect type information from PEP561 compliant packages installed for the Python executable EXECUTABLE
--no-site-packages
This flag will disable searching for PEP561 compliant packages
--no-silence-site-packages
By default, mypy will suppress any error messages generated within PEP561 compliant packages
--fast-module-lookup
The default logic used to scan through search paths to resolve imports has a quadratic worse-case behavior in some cases, which is for instance triggered by a large number of folders sharing
--no-namespace-packages
This flag disables import discovery of namespace packages (see PEP420)
--python-version
This flag will make mypy type check your code as if it were run under Python version X
--platform
This flag will make mypy type check your code as if it were run under the given operating system
--always-true
This flag will treat all variables named NAME as compile-time constants that are always true
--always-false
This flag will treat all variables named NAME as compile-time constants that are always false
--disallow-any-unimported
This flag disallows usage of types that come from unfollowed imports (such types become aliases for Any)
--disallow-any-expr
This flag disallows all expressions in the module that have type Any
--disallow-any-decorated
This flag disallows functions that have Any in their signature after decorator transformation
--disallow-any-explicit
This flag disallows explicit Any in type positions such as type annotations and generic type parameters
--disallow-any-generics
This flag disallows usage of generic types that do not specify explicit type parameters
--disallow-subclassing-any
This flag reports an error whenever a class subclasses a value of type Any
--disallow-untyped-calls
This flag reports an error whenever a function with type annotations calls a function defined without annotations
--untyped-calls-exclude
This flag allows to selectively disable option--disallow-untyped-calls for functions and methods defined in specific packages, modules, or classes
--disallow-untyped-defs
This flag reports an error whenever it encounters a function definition without type annotations or with incomplete type annotations
--disallow-incomplete-defs
This flag reports an error whenever it encounters a partly annotated function definition, while still allowing entirely unannotated definitions
--check-untyped-defs
This flag is less severe than the previous two options -- it type checks the body of every function, regardless of whether it has type annotations
--disallow-untyped-decorators
This flag reports an error whenever a function with type annotations is decorated with a decorator without annotations
--implicit-optional
This flag causes mypy to treat arguments with a None default value as having an implicit pydata~typing
--no-strict-optional
This flag disables strict checking of pydata~typing
--warn-redundant-casts
This flag will make mypy report an error whenever your code uses an unnecessary cast that can safely be removed
--warn-unused-ignores
This flag will make mypy report an error whenever your code uses a # type ignore comment on a line that is not actually generating an error message
--no-warn-no-return
By default, mypy will generate errors when a function is missing return statements in some execution paths
--warn-return-any
This flag causes mypy to generate a warning when returning a value with type Any from a function declared with a non-Any return type
--warn-unreachable
This flag will make mypy report an error whenever it encounters code determined to be unreachable or redundant after performing type analysis
--allow-untyped-globals
This flag causes mypy to suppress errors caused by not being able to fully infer the types of global and class variables
--allow-redefinition
By default, mypy won't allow a variable to be redefined with an unrelated type
--local-partial-types
In mypy, the most common cases for partial types are variables initialized using None, but without explicit Optional annotations
--no-implicit-reexport
By default, imported values to a module are treated as exported and mypy allows other modules to import them
--strict-equality
By default, mypy allows always-false comparisons like 42 == 'no'
--extra-checks
This flag enables additional checks that are technically correct but may be impractical in real code
--strict
This flag mode enables all optional error checking flags
--disable-error-code
This flag allows disabling one or multiple error codes globally
--enable-error-code
This flag allows enabling one or multiple error codes globally
--show-error-context
This flag will precede all errors with 'note' messages explaining the context of the error
--show-column-numbers
This flag will add column offsets to error messages
--show-error-end
This flag will make mypy show not just that start position where an error was detected, but also the end position of the relevant expression
--hide-error-codes
This flag will hide the error code [<code>] from error messages
--pretty
Use visually nicer output in error messages use soft word wrap, show source code snippets, and show error location markers
--no-color-output
This flag will disable color output in error messages, enabled by default
--no-error-summary
This flag will disable error summary
--show-absolute-path
Show absolute paths to files
--soft-error-limit
This flag will adjust the limit after which mypy will (sometimes) disable reporting most additional errors
--no-incremental
This flag disables incremental mode mypy will no longer reference the cache when re-run
--cache-dir
By default, mypy stores all cache data inside of a folder named
--sqlite-cache
Use an SQLite_ database to store the cache
--cache-fine-grained
Include fine-grained dependency information in the cache for the mypy daemon
--skip-version-check
By default, mypy will ignore cache data generated by a different version of mypy
--skip-cache-mtime-checks
Skip cache internal consistency checks based on mtime
--pdb
This flag will invoke the Python debugger when mypy encounters a fatal error
--tb
If set, this flag will display a full traceback when mypy encounters a fatal error
--raise-exceptions
Raise exception on fatal error
--custom-typing-module
This flag lets you use a custom module as a substitute for the pymodtyping module
--custom-typeshed-dir
This flag specifies the directory where mypy looks for standard library typeshed stubs, instead of the typeshed that ships with mypy
--warn-incomplete-stub
This flag modifies both the option--disallow-untyped-defs and option--disallow-incomplete-defs flags so they also report errors if stubs in typeshed are missing type annotations or has incomplete annotations
--shadow-file
When mypy is asked to type check SOURCE_FILE, this flag makes mypy read from and type check the contents of SHADOW_FILE instead
--any-exprs-report
Causes mypy to generate a text file report documenting how many expressions of type Any are present within your codebase
--cobertura-xml-report
Causes mypy to generate a Cobertura XML type checking coverage report
--html-report
Causes mypy to generate an HTML type checking coverage report
--linecount-report
Causes mypy to generate a text file report documenting the functions and lines that are typed and untyped within your codebase
--linecoverage-report
Causes mypy to generate a JSON file that maps each source file's absolute filename to a list of line numbers that belong to typed functions in that file
--lineprecision-report
Causes mypy to generate a flat text file report with per-module statistics of how many lines are typechecked etc
--txt-report
Causes mypy to generate a text file type checking coverage report
--xml-report
Causes mypy to generate an XML type checking coverage report
--install-types
This flag causes mypy to install known missing stub packages for third-party libraries using pip
--non-interactive
When used together with option--install-types <mypy --install-types>, this causes mypy to install all suggested stub packages using pip without asking for confirmation, and then continues to perform type checking using the installed stubs, if some files or modules are provided to type check
--junit-xml
Causes mypy to generate a JUnit XML test result document with type checking results
--find-occurrences
This flag will make mypy print out all usages of a class member based on static type information
--scripts-are-modules
This flag will give command line arguments that appear to be scripts
ArgumentsPositional, in order
<targets>
· repeatable · filepaths