Skip to content

Commit 0a1d6c3

Browse files
authored
Remove Sphinx dependency from mypy (#9370)
2 parents 00ec73d + 2360d0d commit 0a1d6c3

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

.ci/requirements-mypy.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ packaging
99
pyarrow-stubs
1010
pybind11
1111
pytest
12-
sphinx
1312
types-atheris
1413
types-defusedxml
1514
types-olefile

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
persist-credentials: false
2424
- uses: actions/setup-python@v6
2525
with:
26-
python-version: "3.10"
26+
python-version: "3.x"
2727
- name: Install uv
2828
uses: astral-sh/setup-uv@v7
2929
- name: Lint

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ repos:
7676
rev: v0.24.1
7777
hooks:
7878
- id: validate-pyproject
79-
additional_dependencies: [tomli, trove-classifiers>=2024.10.12]
79+
additional_dependencies: [trove-classifiers>=2024.10.12]
8080

8181
- repo: https://github.com/tox-dev/tox-ini-fmt
8282
rev: 1.7.0

docs/dater.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
TYPE_CHECKING = False
1313
if TYPE_CHECKING:
14-
from sphinx.application import Sphinx
14+
from typing import Any
1515

1616
DOC_NAME_REGEX = re.compile(r"releasenotes/\d+\.\d+\.\d+")
1717
VERSION_TITLE_REGEX = re.compile(r"^(\d+\.\d+\.\d+)\n-+\n")
@@ -28,7 +28,7 @@ def get_date_for(git_version: str) -> str | None:
2828
return out.split()[0]
2929

3030

31-
def add_date(app: Sphinx, doc_name: str, source: list[str]) -> None:
31+
def add_date(app: Any, doc_name: str, source: list[str]) -> None:
3232
if DOC_NAME_REGEX.match(doc_name) and (m := VERSION_TITLE_REGEX.match(source[0])):
3333
old_title = m.group(1)
3434

@@ -43,6 +43,6 @@ def add_date(app: Sphinx, doc_name: str, source: list[str]) -> None:
4343
source[0] = result
4444

4545

46-
def setup(app: Sphinx) -> dict[str, bool]:
46+
def setup(app: Any) -> dict[str, bool]:
4747
app.connect("source-read", add_date)
4848
return {"parallel_read_safe": True}

0 commit comments

Comments
 (0)