Skip to content

Commit 89c03fa

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

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sphinx_external_toc/_compat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ def _validator(inst, attr, value):
139139

140140
return _validator
141141

142+
142143
# Docutils compatibility
143144

145+
144146
def findall(node: Element):
145147
# findall replaces traverse in docutils v0.18
146148
# note a difference is that findall is an iterator
147-
return getattr(node, "findall", node.traverse)
149+
return getattr(node, "findall", node.traverse)

sphinx_external_toc/events.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
from sphinx.util.docutils import SphinxDirective
1515
from sphinx.util.matching import Matcher, patfilter, patmatch
1616

17-
18-
from .api import Document, FileItem, GlobItem, SiteMap, UrlItem
1917
from ._compat import findall
18+
from .api import Document, FileItem, GlobItem, SiteMap, UrlItem
2019
from .parsing import parse_toc_yaml
2120

2221
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)