Skip to content

Commit cd064bd

Browse files
authored
MAINT: Fix some types (#1779)
It look like one type annotation was incorrect
1 parent a4eaf77 commit cd064bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pydata_sphinx_theme/utils.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import copy
44
import os
55
import re
6-
from typing import Any, Dict, Iterator, List, Optional, Union
6+
from typing import Any, Callable, Dict, Iterable, List, Optional, Union
77

88
from docutils.nodes import Node
99
from sphinx.application import Sphinx
@@ -32,7 +32,9 @@ def config_provided_by_user(app: Sphinx, key: str) -> bool:
3232
return any(key in ii for ii in [app.config.overrides, app.config._raw_config])
3333

3434

35-
def traverse_or_findall(node: Node, condition: str, **kwargs) -> Iterator[Node]:
35+
def traverse_or_findall(
36+
node: Node, condition: Union[Callable, type], **kwargs
37+
) -> Iterable[Node]:
3638
"""Triage node.traverse (docutils <0.18.1) vs node.findall.
3739
3840
TODO: This check can be removed when the minimum supported docutils version

0 commit comments

Comments
 (0)