Skip to content

Commit e0c2771

Browse files
committed
[WIP] hackety hack
1 parent 747b2fc commit e0c2771

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

support/walk-modules.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
def walk_pkgutil(mod_name, mod):
1111
for pkg in pkgutil.walk_packages(mod.__path__, mod_name + "."):
12-
# pkgutil can produce false positives due to re-exports;
13-
# we filter them out by attempting to import them.
14-
try:
15-
__import__(pkg.name)
16-
walk(pkg.name)
17-
except:
18-
pass
12+
if pkg.name in SEEN_MODS:
13+
continue
14+
else
15+
# We don't recurse here because `walk_packages` takes care of
16+
# it for us.
17+
SEEN_MODS.add(pkg.name)
18+
print(pkg.name)
1919

2020

2121
def walk_naive(mod_name, mod):

0 commit comments

Comments
 (0)