Skip to content

Commit 79315e2

Browse files
committed
Single file modules
1 parent e455ecc commit 79315e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/build.py

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

856856
def verify_module(id: str, path: str) -> bool:
857857
"""Check that all packages containing id have a __init__ file."""
858+
if path.endswith(tuple(PYTHON_EXTENSIONS)):
859+
return True
860+
858861
if path.endswith(('__init__.py', '__init__.pyi')):
859862
path = dirname(path)
860-
return True
861863

862864
for i in range(id.count('.')):
863865
path = dirname(path)

0 commit comments

Comments
 (0)