Skip to content

Commit c796cd5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6b31ffd commit c796cd5

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

sphinx_external_toc/events.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ def insert_toctrees(app: Sphinx, doctree: nodes.document) -> None:
220220
node_list: List[nodes.Element] = []
221221

222222
for toctree in doc_item.subtrees:
223-
224223
subnode = toctree_node()
225224
subnode["parent"] = app.env.docname
226225
subnode.source = doctree["source"]
@@ -245,13 +244,10 @@ def insert_toctrees(app: Sphinx, doctree: nodes.document) -> None:
245244
wrappernode.append(subnode)
246245

247246
for entry in toctree.items:
248-
249247
if isinstance(entry, UrlItem):
250-
251248
subnode["entries"].append((entry.title, entry.url))
252249

253250
elif isinstance(entry, FileItem):
254-
255251
child_doc_item = site_map[entry]
256252
docname = str(entry)
257253
title = child_doc_item.title

sphinx_external_toc/parsing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def _parse_doc_item(
193193

194194
toctrees = []
195195
for toc_idx, toc_data in enumerate(subtrees_data):
196-
197196
toc_path = path if shorthand_used else f"{path}{toc_idx}/"
198197

199198
if not (isinstance(toc_data, Mapping) and items_key in toc_data):
@@ -209,7 +208,6 @@ def _parse_doc_item(
209208
# generate items list
210209
items: List[Union[GlobItem, FileItem, UrlItem]] = []
211210
for item_idx, item_data in enumerate(items_data):
212-
213211
if not isinstance(item_data, Mapping):
214212
raise MalformedError(
215213
f"entry not a mapping type @ '{toc_path}{items_key}/{item_idx}'"

sphinx_external_toc/tools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def create_site_from_toc(
5959

6060
# create files
6161
for docname in chain(site_map, additional_files):
62-
6362
# create document
6463
filename = docname
6564
if not any(docname.endswith(ext) for ext in {".rst", ".md"}):

tests/test_tools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_file_to_sitemap(path: Path, tmp_path: Path, data_regression):
2626

2727

2828
def test_create_site_map_from_path(tmp_path: Path, data_regression):
29-
3029
# create project files
3130
files = [
3231
"index.rst",

0 commit comments

Comments
 (0)