We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad5982b commit 76f7750Copy full SHA for 76f7750
mypy/modulefinder.py
@@ -331,9 +331,8 @@ def _find_module_non_stub_helper(
331
# If this is not a directory then we can't traverse further into it
332
if not self.fscache.isdir(dir_path):
333
break
334
- for i in range(len(components), 0, -1):
335
- if approved_stub_package_exists(".".join(components[:i])):
336
- return ModuleNotFoundReason.APPROVED_STUBS_NOT_INSTALLED
+ if approved_stub_package_exists(".".join(components)):
+ return ModuleNotFoundReason.APPROVED_STUBS_NOT_INSTALLED
337
if plausible_match:
338
return ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS
339
else:
0 commit comments