Skip to content

Commit 747b2fc

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

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

support/walk-modules.py

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

1010
def walk_pkgutil(mod_name, mod):
1111
for pkg in pkgutil.walk_packages(mod.__path__, mod_name + "."):
12-
walk(pkg.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
1319

1420

1521
def walk_naive(mod_name, mod):

0 commit comments

Comments
 (0)