From a4e70cf3e12cd8c4ad948aa37260afe22517d6d3 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 17 Aug 2022 22:52:10 -0400 Subject: [PATCH] Remove now-unused dfhack-keybind role --- conf.py | 6 ------ docs/sphinx_extensions/dfhack/tool_docs.py | 8 -------- 2 files changed, 14 deletions(-) diff --git a/conf.py b/conf.py index c2e820b9a..924da1577 100644 --- a/conf.py +++ b/conf.py @@ -118,12 +118,6 @@ def write_tool_docs(): for k in DOC_ALL_DIRS: header = ':orphan:\n' label = ('.. _{name}:\n\n').format(name=k[0]) - # TODO: can we autogenerate the :dfhack-keybind: line? it would go beneath - # the tool header, which is currently in the middle of the included file. - # should we remove those headers from the doc files and just generate them - # here? That might be easier. But then where will the tags go? It would - # look better if they were above the keybinds, but then we'd be in the - # same situation. include = ('.. include:: /{path}\n\n').format(path=k[1]) # TODO: generate a footer with links to tools that share at least one # tag with this tool. Just the tool names, strung across the bottom of diff --git a/docs/sphinx_extensions/dfhack/tool_docs.py b/docs/sphinx_extensions/dfhack/tool_docs.py index b065ee7a7..20e484954 100644 --- a/docs/sphinx_extensions/dfhack/tool_docs.py +++ b/docs/sphinx_extensions/dfhack/tool_docs.py @@ -89,13 +89,6 @@ def check_missing_keybinds(): logger.warning('Undocumented keybindings for command: %s', missing_command) -# pylint:disable=unused-argument,dangerous-default-value,too-many-arguments -def dfhack_keybind_role(role, rawtext, text, lineno, inliner, - options={}, content=[]): - """Custom role parser for DFHack default keybinds.""" - return render_dfhack_keybind(text), [] - - class DFHackToolDirectiveBase(sphinx.directives.ObjectDescription): has_content = False required_arguments = 0 @@ -169,7 +162,6 @@ class DFHackCommandDirective(DFHackToolDirectiveBase): def register(app): app.add_directive('dfhack-tool', DFHackToolDirective) app.add_directive('dfhack-command', DFHackCommandDirective) - app.add_role('dfhack-keybind', dfhack_keybind_role) _KEYBINDS.update(scan_all_keybinds(os.path.join(dfhack.util.DFHACK_ROOT, 'data', 'init')))