@@ -104,6 +104,9 @@ Details of the options:
104
104
You can't mix paths and :option: `-m `/:option: `-p ` options in the same stubgen
105
105
invocation.
106
106
107
+ Stubgen applies heuristics to avoid generating stubs for submodules
108
+ that include tests or vendored third-party packages.
109
+
107
110
Specifying how to generate stubs
108
111
********************************
109
112
@@ -116,12 +119,13 @@ alter the default behavior:
116
119
117
120
.. option :: --no-import
118
121
119
- Don't try to import modules. Instead use mypy's normal search mechanism to find
122
+ Don't try to import modules. Instead only use mypy's normal search mechanism to find
120
123
sources. This does not support C extension modules. This flag also disables
121
124
runtime introspection functionality, which mypy uses to find the value of
122
125
``__all__ ``. As result the set of exported imported names in stubs may be
123
- incomplete. This flag is generally only useful when importing a module generates
124
- an error for some reason.
126
+ incomplete. This flag is generally only useful when importing a module causes
127
+ unwanted side effects, such as the running of tests. Stubgen tries to skip test
128
+ modules even without this option, but this does not always work.
125
129
126
130
.. option :: --parse-only
127
131
@@ -153,6 +157,12 @@ Additional flags
153
157
Include definitions that are considered private in stubs (with names such
154
158
as ``_foo `` with single leading underscore and no trailing underscores).
155
159
160
+ .. option :: --export-less
161
+
162
+ Don't export all names imported from other modules within the same package.
163
+ Instead, only export imported names that are not referenced in the module
164
+ that contains the import.
165
+
156
166
.. option :: --search-path PATH
157
167
158
168
Specify module search directories, separated by colons (only used if
@@ -171,3 +181,11 @@ Additional flags
171
181
``./out `` directory. The output directory will be created if it doesn't
172
182
exist. Existing stubs in the output directory will be overwritten without
173
183
warning.
184
+
185
+ .. option :: -v , --verbose
186
+
187
+ Produce more verbose output.
188
+
189
+ .. option :: -q , --quiet
190
+
191
+ Produce less verbose output.
0 commit comments