Skip to content

Commit 5c9d37a

Browse files
committed
Fix mypy error
1 parent ed7a12c commit 5c9d37a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mypy.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ exclude = (?x)(
2121
# *.extern modules that actually live in *._vendor will also cause attr-defined issues on import
2222
disable_error_code = attr-defined
2323

24+
# - pkg_resources tests create modules that won't exists statically before the test is run.
25+
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
26+
[mypy-pkg_resources.tests.*]
27+
disable_error_code = import-not-found
28+
2429
# - Avoid raising issues when importing from "extern" modules, as those are added to path dynamically.
2530
# https://github.com/pypa/setuptools/pull/3979#discussion_r1367968993
2631
# - distutils._modified has different errors on Python 3.8 [import-untyped], on Python 3.9+ [import-not-found]
@@ -29,9 +34,7 @@ disable_error_code = attr-defined
2934
[mypy-pkg_resources.extern.*,setuptools.extern.*,distutils._modified,jaraco.*,trove_classifiers]
3035
ignore_missing_imports = True
3136

32-
# - pkg_resources tests create modules that won't exists statically before the test is run.
33-
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
3437
# Even when excluding vendored/generated modules, there might be problems: https://github.com/python/mypy/issues/11936#issuecomment-1466764006
35-
[mypy-pkg_resources.tests.*,setuptools._vendor.packaging._manylinux,setuptools.config._validate_pyproject.*]
38+
[mypy-setuptools._vendor.packaging._manylinux,setuptools.config._validate_pyproject.*]
3639
follow_imports = silent
3740
# silent => ignore errors when following imports

0 commit comments

Comments
 (0)