Skip to content

Commit 05f245f

Browse files
committed
use Any insted
1 parent 308a2c9 commit 05f245f

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

docs/conf.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
import os
99
import sys
10-
from typing import TYPE_CHECKING
11-
12-
if TYPE_CHECKING:
13-
from sphinx.application import Sphinx
10+
from typing import Any
1411

1512
# Add the src directory to the path so we can import the package
1613
sys.path.insert(0, os.path.abspath("../src"))
@@ -61,7 +58,7 @@
6158
autodoc_typehints_description_target = "documented"
6259

6360

64-
def _inject_type_submodules(_app: Sphinx, docname: str, source: list[str]) -> None:
61+
def _inject_type_submodules(_app: Any, docname: str, source: list[str]) -> None:
6562
"""Auto-generate automodule directives for all type submodules.
6663
6764
Replaces the ``.. auto-all-types::`` placeholder in types.rst with
@@ -87,8 +84,8 @@ def _inject_type_submodules(_app: Sphinx, docname: str, source: list[str]) -> No
8784
source[0] = source[0].replace(".. auto-all-types::", "\n".join(directives))
8885

8986

90-
def setup(app: Sphinx) -> None:
91-
app.connect("source-read", _inject_type_submodules) # pyright: ignore[reportUnknownMemberType]
87+
def setup(app: Any) -> None:
88+
app.connect("source-read", _inject_type_submodules)
9289

9390

9491
# Intersphinx mapping

0 commit comments

Comments
 (0)