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.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/ext/ifconfig.py b/sphinx/ext/ifconfig.py
index 112cc763f..4fd5fa391 100644
--- a/sphinx/ext/ifconfig.py
+++ b/sphinx/ext/ifconfig.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
sphinx.ext.ifconfig
~~~~~~~~~~~~~~~~~~~
@@ -51,12 +50,12 @@ class IfConfig(SphinxDirective):
set_source_info(self, node)
node['expr'] = self.arguments[0]
self.state.nested_parse(self.content, self.content_offset,
- node, match_titles=1)
+ node, match_titles=True)
return [node]
def process_ifconfig_nodes(app, doctree, docname):
- # type: (Sphinx, nodes.Node, unicode) -> None
+ # type: (Sphinx, nodes.document, str) -> None
ns = dict((confval.name, confval.value) for confval in app.config)
ns.update(app.config.__dict__.copy())
ns['builder'] = app.builder.name
@@ -79,7 +78,7 @@ def process_ifconfig_nodes(app, doctree, docname):
def setup(app):
- # type: (Sphinx) -> Dict[unicode, Any]
+ # type: (Sphinx) -> Dict[str, Any]
app.add_node(ifconfig)
app.add_directive('ifconfig', IfConfig)
app.connect('doctree-resolved', process_ifconfig_nodes)