Skip to content

Commit e898652

Browse files
authored
Respect per-module follow_import for empty folders (#13758)
Fixes #13757
1 parent 2562140 commit e898652

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mypy/build.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,11 +2592,11 @@ def find_module_and_diagnose(
25922592
if (
25932593
root_source # Honor top-level modules
25942594
or (
2595-
not result.endswith(".py") # Stubs are always normal
2596-
and not options.follow_imports_for_stubs
2597-
) # except when they aren't
2598-
or id in mypy.semanal_main.core_modules
2599-
): # core is always normal
2595+
result.endswith(".pyi") # Stubs are always normal
2596+
and not options.follow_imports_for_stubs # except when they aren't
2597+
)
2598+
or id in mypy.semanal_main.core_modules # core is always normal
2599+
):
26002600
follow_imports = "normal"
26012601
if skip_diagnose:
26022602
pass

0 commit comments

Comments
 (0)