diff options
Diffstat (limited to 'sphinx/environment')
-rw-r--r-- | sphinx/environment/adapters/toctree.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sphinx/environment/adapters/toctree.py b/sphinx/environment/adapters/toctree.py index fe8f43656..bd3abd9ed 100644 --- a/sphinx/environment/adapters/toctree.py +++ b/sphinx/environment/adapters/toctree.py @@ -315,17 +315,17 @@ class TocTree: return toc def get_toctree_for(self, docname: str, builder: "Builder", collapse: bool, - **kwds: Any) -> Element: + **kwargs: Any) -> Element: """Return the global TOC nodetree.""" doctree = self.env.get_doctree(self.env.config.master_doc) toctrees = [] # type: List[Element] - if 'includehidden' not in kwds: - kwds['includehidden'] = True - if 'maxdepth' not in kwds: - kwds['maxdepth'] = 0 - kwds['collapse'] = collapse + if 'includehidden' not in kwargs: + kwargs['includehidden'] = True + if 'maxdepth' not in kwargs: + kwargs['maxdepth'] = 0 + kwargs['collapse'] = collapse for toctreenode in doctree.traverse(addnodes.toctree): - toctree = self.resolve(docname, builder, toctreenode, prune=True, **kwds) + toctree = self.resolve(docname, builder, toctreenode, prune=True, **kwargs) if toctree: toctrees.append(toctree) if not toctrees: |