Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-08-18 18:37:30 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-08-18 18:37:30 +0300
commit01f8dad160d206a48302b1bcd91b4e0bc36e8a10 (patch)
tree20604869dffc969d22c5f6f124f710ee392a6de6 /sphinx/highlighting.py
parent632889a4ef7f0e9aa797c2f029a5948b69a0ee15 (diff)
parent63757596b14991801ce09d1ac9bff425715e0c40 (diff)
Merge branch '2.0'
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r--sphinx/highlighting.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 16de39edc..3f22284c8 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -9,6 +9,7 @@
"""
from functools import partial
+from importlib import import_module
from pygments import highlight
from pygments.filters import ErrorToken
@@ -83,7 +84,7 @@ class PygmentsBridge:
return NoneStyle
elif '.' in stylename:
module, stylename = stylename.rsplit('.', 1)
- return getattr(__import__(module, None, None, ['__name__']), stylename)
+ return getattr(import_module(module), stylename)
else:
return get_style_by_name(stylename)