Skip to content

Commit cc959d9

Browse files
committed
fix tests
1 parent b0fed12 commit cc959d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/stubtest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,14 +1497,16 @@ def build_stubs(modules: list[str], options: Options, find_submodules: bool = Fa
14971497
# find submodules via pkgutil
14981498
try:
14991499
runtime = silent_import_module(module)
1500+
runtime_path = runtime.__path__
1501+
runtime_name = runtime.__name__
15001502
except KeyboardInterrupt:
15011503
raise
15021504
except BaseException:
15031505
pass
15041506
else:
15051507
all_modules.extend(
15061508
m.name
1507-
for m in pkgutil.walk_packages(runtime.__path__, runtime.__name__ + ".")
1509+
for m in pkgutil.walk_packages(runtime_path, runtime_name + ".")
15081510
if m.name not in all_modules
15091511
)
15101512

0 commit comments

Comments
 (0)