Skip to content

Commit

Permalink
Single file modules
Browse files Browse the repository at this point in the history
  • Loading branch information
m-novikov committed Nov 23, 2017
1 parent e455ecc commit 79315e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,11 @@ def find_modules_recursive(module: str, lib_path: List[str]) -> List[BuildSource

def verify_module(id: str, path: str) -> bool:
"""Check that all packages containing id have a __init__ file."""
if path.endswith(tuple(PYTHON_EXTENSIONS)):
return True

if path.endswith(('__init__.py', '__init__.pyi')):
path = dirname(path)
return True

for i in range(id.count('.')):
path = dirname(path)
Expand Down

0 comments on commit 79315e2

Please sign in to comment.