Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Dec 11, 2022
1 parent b0fed12 commit cc959d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1497,14 +1497,16 @@ def build_stubs(modules: list[str], options: Options, find_submodules: bool = Fa
# find submodules via pkgutil
try:
runtime = silent_import_module(module)
runtime_path = runtime.__path__
runtime_name = runtime.__name__
except KeyboardInterrupt:
raise
except BaseException:
pass
else:
all_modules.extend(
m.name
for m in pkgutil.walk_packages(runtime.__path__, runtime.__name__ + ".")
for m in pkgutil.walk_packages(runtime_path, runtime_name + ".")
if m.name not in all_modules
)

Expand Down

0 comments on commit cc959d9

Please sign in to comment.