8000 Merge pull request #21572 from ev-br/abs_paths_in_refguide-check · rjeb/numpy@29e2fc9 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 29e2fc9

Browse files
authored
Merge pull request numpy#21572 from ev-br/abs_paths_in_refguide-check
MAINT: allow absolute module names in refguide-check
2 parents 0152441 + 0fb6493 commit 29e2fc9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/refguide_check.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,12 @@ def main(argv):
11691169
init_matplotlib()
11701170

11711171
for submodule_name in module_names:
1172-
module_name = BASE_MODULE + '.' + submodule_name
1172+
prefix = BASE_MODULE + '.'
1173+
if not submodule_name.startswith(prefix):
1174+
module_name = prefix + submodule_name
1175+
else:
1176+
module_name = submodule_name
1177+
11731178
__import__(module_name)
11741179
module = sys.modules[module_name]
11751180

0 commit comments

Comments
 (0)
0