Reputation: 12315
I have a number of files that import other untyped libraries.
I've added this to mypy.ini
eg:
[coloredlogs]
ignore_missing_imports = True
So maybe that works to NOT check the library itself? eg in a /venv
but still in every.single.place a library is imported I get these warnings.
The only way i can get the ignore working is adding annotation on every.single.import
import coloredlogs # type: ignore
refs: https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Upvotes: 2
Views: 4722
Reputation: 169368
Your configuration syntax is wrong. The example in the docs you've linked is
[mypy-foobar.*]
ignore_missing_imports = True
so you'll want
[mypy-coloredlogs.*]
ignore_missing_imports = True
Upvotes: 7