We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 747b2fc commit 300689cCopy full SHA for 300689c
support/walk-modules.py
@@ -9,13 +9,13 @@
9
10
def walk_pkgutil(mod_name, mod):
11
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
+ if pkg.name in SEEN_MODS:
+ continue
+ else:
+ # We don't recurse here because `walk_packages` takes care of
+ # it for us.
+ SEEN_MODS.add(pkg.name)
+ print(pkg.name)
19
20
21
def walk_naive(mod_name, mod):
0 commit comments