diff options
author | Daniel Eades <danieleades@hotmail.com> | 2022-01-10 12:21:53 +0300 |
---|---|---|
committer | Daniel Eades <danieleades@hotmail.com> | 2022-01-12 23:19:18 +0300 |
commit | 6697ed62ed38287b72dd6ff213ba41d9d8f86466 (patch) | |
tree | ea61d054d85df6215dd3a8e42294e2c3ead60269 /sphinx/writers/texinfo.py | |
parent | 49196d44746f7dd84dcc3a1837bd5c8d68a9848e (diff) |
address some unused loop control variables (B007)
Diffstat (limited to 'sphinx/writers/texinfo.py')
-rw-r--r-- | sphinx/writers/texinfo.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index 351aef2f7..47f61e9b7 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -312,7 +312,7 @@ class TexinfoTranslator(SphinxTranslator): del node_menus[top['node_name']] top['node_name'] = 'Top' # handle the indices - for name, content in self.indices: + for name, _content in self.indices: node_menus[name] = [] node_menus['Top'].append(name) @@ -320,7 +320,7 @@ class TexinfoTranslator(SphinxTranslator): """Collect the relative links (next, previous, up) for each "node".""" rellinks = self.rellinks node_menus = self.node_menus - for id, entries in node_menus.items(): + for id in node_menus.keys(): rellinks[id] = ['', '', ''] # up's for id, entries in node_menus.items(): @@ -466,7 +466,7 @@ class TexinfoTranslator(SphinxTranslator): def collect_indices(self) -> None: def generate(content: List[Tuple[str, List[IndexEntry]]], collapsed: bool) -> str: ret = ['\n@menu\n'] - for letter, entries in content: + for _letter, entries in content: for entry in entries: if not entry[3]: continue @@ -1018,7 +1018,7 @@ class TexinfoTranslator(SphinxTranslator): if len(self.colwidths) != self.n_cols: return self.body.append('\n\n@multitable ') - for i, n in enumerate(self.colwidths): + for n in self.colwidths: self.body.append('{%s} ' % ('x' * (n + 2))) def depart_colspec(self, node: Element) -> None: @@ -1054,7 +1054,7 @@ class TexinfoTranslator(SphinxTranslator): self.entry_sep = '@tab' def depart_entry(self, node: Element) -> None: - for i in range(node.get('morecols', 0)): + for _i in range(node.get('morecols', 0)): self.body.append('\n@tab\n') # -- Field Lists |