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 Jan 13, 2025
1 parent da48702 commit 6115b27
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions sphinx_external_toc/_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Compatibility for using dataclasses instead of attrs."""

from __future__ import annotations

import dataclasses as dc
Expand Down
1 change: 1 addition & 0 deletions sphinx_external_toc/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines the `SiteMap` object, for storing the parsed ToC."""

from collections.abc import MutableMapping
from dataclasses import asdict, dataclass
from typing import Any, Dict, Iterator, List, Optional, Set, Union
Expand Down
1 change: 1 addition & 0 deletions sphinx_external_toc/events.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx event functions and directives."""

import glob
from pathlib import Path, PurePosixPath
from typing import Any, List, Optional, Set
Expand Down
1 change: 1 addition & 0 deletions sphinx_external_toc/parsing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Parse the ToC to a `SiteMap` object."""

from collections.abc import Mapping
from dataclasses import dataclass, fields
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_create_toc_dict(path: Path, data_regression):
"items_in_glob.yml": "entry contains incompatible keys 'glob' and 'entries' @ '/entries/0'",
"no_root.yml": "'root' key not found @ '/'",
"unknown_keys_nested.yml": (
"Unknown keys found: {'unknown'}, allow.* " "@ '/subtrees/0/entries/1/'"
"Unknown keys found: {'unknown'}, allow.* @ '/subtrees/0/entries/1/'"
),
"empty_subtrees.yml": "'subtrees' not a non-empty list @ '/'",
"items_in_url.yml": "entry contains incompatible keys 'url' and 'entries' @ '/entries/0'",
Expand Down

0 comments on commit 6115b27

Please sign in to comment.