From cb39a93892571be4fecb428d2d6db0b17dcba874 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 17 Jul 2019 20:14:05 +0200 Subject: [PATCH] documentation/python: minor cleanup. --- documentation/python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/python.py b/documentation/python.py index ab6d4399..dea27706 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -1688,7 +1688,7 @@ def run(basedir, config, templates): index_entry = Empty() index_entry.kind = 'page' index_entry.name = entry.name - index_entry.url = state.config['URL_FORMATTER'](entry.type, entry.path)[1] + index_entry.url = config['URL_FORMATTER'](entry.type, entry.path)[1] index_entry.summary = entry.summary index_entry.has_nestable_children = False index_entry.children = [] @@ -1700,7 +1700,7 @@ def run(basedir, config, templates): index.pages = page_index for file in special_pages[1:]: # exclude index template = env.get_template(file + '.html') - filename, url = state.config['URL_FORMATTER'](EntryType.SPECIAL, [file]) + filename, url = config['URL_FORMATTER'](EntryType.SPECIAL, [file]) rendered = template.render(index=index, URL=url, **config) with open(os.path.join(config['OUTPUT'], filename), 'wb') as f: f.write(rendered.encode('utf-8')) @@ -1714,7 +1714,7 @@ def run(basedir, config, templates): if 'index.rst' not in [os.path.basename(i) for i in config['INPUT_PAGES']]: logging.debug("writing index.html for an empty main page") - filename, url = state.config['URL_FORMATTER'](EntryType.SPECIAL, ['index']) + filename, url = config['URL_FORMATTER'](EntryType.SPECIAL, ['index']) page = Empty() page.filename = filename -- 2.30.2