Skip to content

Commit 6a1fe61

Browse files
author
Arne Welzel
committed
modulefinder: treat __init__.pyi like __init__.py
The main idea being that we shouldn't consider a directory a namespace package if either of them is present.
1 parent 3bc56d2 commit 6a1fe61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mypy/modulefinder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def _find_module(self, id: str) -> Optional[str]:
227227
continue
228228
return path
229229
elif fscache.isfile_case(path_stubs, dir_prefix):
230+
has_init = True
230231
if verify and not verify_module(fscache, id, path_stubs, dir_prefix):
231232
near_misses.append((path_stubs, dir_prefix))
232233
continue

0 commit comments

Comments
 (0)