Skip to content

Commit 6eac2f7

Browse files
committed
Single file modules
1 parent d5f10b0 commit 6eac2f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: mypy/build.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,11 @@ def find_modules_recursive(module: str, lib_path: List[str]) -> List[BuildSource
859859

860860
def verify_module(id: str, path: str) -> bool:
861861
"""Check that all packages containing id have a __init__ file."""
862+
if path.endswith(tuple(PYTHON_EXTENSIONS)):
863+
return True
864+
862865
if path.endswith(('__init__.py', '__init__.pyi')):
863866
path = dirname(path)
864-
return True
865867

866868
for i in range(id.count('.')):
867869
path = dirname(path)

0 commit comments

Comments
 (0)