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 d62c5c2 commit 993cbdaCopy full SHA for 993cbda
sphinxarg/ext.py
@@ -1,5 +1,6 @@
1
from __future__ import annotations
2
3
+import importlib
4
import os
5
import shutil
6
import sys
@@ -496,7 +497,7 @@ def run(self):
496
497
# Skip this if we're dealing with a local file, since it obviously can't be imported
498
if 'filename' not in self.options:
499
try:
- mod = __import__(module_name, globals(), locals(), [attr_name])
500
+ mod = importlib.import_module(module_name)
501
except ImportError as exc:
502
raise self.error(
503
f'Failed to import "{attr_name}" from "{module_name}".\n'
0 commit comments