summaryrefslogtreecommitdiff
path: root/sphinx/ext/ifconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/ifconfig.py')
-rw-r--r--sphinx/ext/ifconfig.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/ext/ifconfig.py b/sphinx/ext/ifconfig.py
index 16042ac3f..f22a37e92 100644
--- a/sphinx/ext/ifconfig.py
+++ b/sphinx/ext/ifconfig.py
@@ -21,9 +21,9 @@
"""
from docutils import nodes
-from docutils.parsers.rst import Directive
import sphinx
+from sphinx.util.docutils import SphinxDirective
from sphinx.util.nodes import set_source_info
if False:
@@ -36,7 +36,7 @@ class ifconfig(nodes.Element):
pass
-class IfConfig(Directive):
+class IfConfig(SphinxDirective):
has_content = True
required_arguments = 1
@@ -57,7 +57,7 @@ class IfConfig(Directive):
def process_ifconfig_nodes(app, doctree, docname):
# type: (Sphinx, nodes.Node, unicode) -> None
- ns = dict((confval.name, confval.value) for confval in app.config) # type: ignore
+ ns = dict((confval.name, confval.value) for confval in app.config)
ns.update(app.config.__dict__.copy())
ns['builder'] = app.builder.name
for node in doctree.traverse(ifconfig):