File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,8 +209,8 @@ overridden by the pattern sections matching the module name.
209209- ``no_implicit_optional `` (Boolean, default false) changes the treatment of
210210 arguments with a default value of None by not implicitly making their type Optional
211211
212- Example
213- *******
212+ Examples
213+ ********
214214
215215You might put this in your ``mypy.ini `` file at the root of your repo:
216216
@@ -227,6 +227,17 @@ for all mypy runs in this tree, and also selectively turns on the
227227package. This issues an error for function definitions without
228228type annotations in that subdirectory only.
229229
230+ If you would like to ignore specific imports, instead of ignoring all missing
231+ imports with ``--ignore-missing-imports ``, use a section of the configuration
232+ file per module such as the following to ignore missing imports from
233+ ``lib_module ``:
234+
235+ .. code-block :: text
236+
237+ [mypy-lib_module]
238+ ignore_missing_imports = True
239+
240+
230241 .. note ::
231242
232243 Configuration flags are liable to change between releases.
You can’t perform that action at this time.
0 commit comments