diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-30 11:41:00 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-01-07 19:39:07 +0300 |
commit | a6a1721de6ffdae3886e852b59f33630f1998477 (patch) | |
tree | 48ea511b8f7ccc0a7150d6059bcb3edb4cd7e57e /sphinx/environment | |
parent | 8e1cbd24c61934df7eb426aad0dc48830789b096 (diff) |
refactor: Rename var keyword argument to "**kwargs"
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: |