Skip to content

Commit 0c678bc

Browse files
committed
fixup! Search sys.path for PEP-561 compliant packages
1 parent 7b88327 commit 0c678bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/modulefinder.py

+2
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ def _find_module_non_stub_helper(self, components: List[str],
247247
elif not plausible_match and (self.fscache.isdir(dir_path)
248248
or self.fscache.isfile(dir_path + ".py")):
249249
plausible_match = True
250+
if not self.fscache.isdir(dir_path):
251+
break
250252
if is_legacy_bundled_package(components[0], self.python_major_ver):
251253
if (len(components) == 1
252254
or (self.find_module(components[0]) is

0 commit comments

Comments
 (0)