DOKK / manpages / debian 10 / mypy / stubgen.1.en
STUBGEN(1) User Commands STUBGEN(1)

stubgen - Generate draft stubs for Python modules.

usage: stubgen [-h] [--py2] [more options, see -h]

[-m MODULE] [-p PACKAGE] [files ...]

Generate draft stubs for modules. Stubs are generated in directory ./out, to avoid overriding files with manual changes. This directory is assumed to exist.

generate stubs for given files or directories

show this help message and exit
run in Python 2 mode (default: Python 3 mode)
ignore errors when trying to generate stubs for modules
don't import the modules, just parse and analyze them (doesn't work with C extension modules and might not respect __all__)
don't perform semantic analysis of sources, just parse them (only applies to Python modules, might affect quality of stubs)
generate stubs for objects and members considered private (single leading underscore and no trailing underscores)
use .rst documentation in PATH (this may result in better stubs in some cases; consider setting this to DIR/Python-X.Y.Z/Doc/library)
specify module search directories, separated by ':' (currently only used if --no-import is given)
use Python interpreter at PATH (only works for Python 2 right now)
change the output directory [default: out]
generate stub for module; can repeat for more modules
generate stubs for package recursively; can be repeated
February 2019 stubgen 0.670