Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 4, 2023
1 parent 794cecb commit d3f12d6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing
# Contributing

`sphinx-external-toc` is part of the executablebooks project, who also are responsible for `jupyter-book`.

Expand Down
2 changes: 0 additions & 2 deletions sphinx_external_toc/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ def _parse_doc_item(

toctrees = []
for toc_idx, toc_data in enumerate(subtrees_data):

toc_path = path if shorthand_used else f"{path}{toc_idx}/"

if not (isinstance(toc_data, Mapping) and items_key in toc_data):
Expand All @@ -209,7 +208,6 @@ def _parse_doc_item(
# generate items list
items: List[Union[GlobItem, FileItem, UrlItem]] = []
for item_idx, item_data in enumerate(items_data):

if not isinstance(item_data, Mapping):
raise MalformedError(
f"entry not a mapping type @ '{toc_path}{items_key}/{item_idx}'"
Expand Down
1 change: 0 additions & 1 deletion sphinx_external_toc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def create_site_from_toc(

# create files
for docname in chain(site_map, additional_files):

# create document
filename = docname
if not any(docname.endswith(ext) for ext in {".rst", ".md"}):
Expand Down
1 change: 0 additions & 1 deletion tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def test_file_to_sitemap(path: Path, tmp_path: Path, data_regression):


def test_create_site_map_from_path(tmp_path: Path, data_regression):

# create project files
files = [
"index.rst",
Expand Down

0 comments on commit d3f12d6

Please sign in to comment.