mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Reimplement fix for #4019
This commit is contained in:
parent
953a303fd4
commit
1d174a7dca
@ -76,11 +76,13 @@ def try_import(objname):
|
||||
__import__(objname)
|
||||
return sys.modules.get(objname) # type: ignore
|
||||
except ImportError:
|
||||
try:
|
||||
modname, attrname = module_sig_re.match(objname).groups() # type: ignore
|
||||
except AttributeError:
|
||||
matched = module_sig_re.match(objname) # type: ignore
|
||||
|
||||
if not matched:
|
||||
return None
|
||||
else:
|
||||
|
||||
modname, attrname = matched.groups()
|
||||
|
||||
if modname is None:
|
||||
return None
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user