Skip to content

Commit ba36f94

Browse files
[pre-commit.ci] pre-commit autoupdate (#162)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Philipp A. <[email protected]>
1 parent cabc5c4 commit ba36f94

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: trailing-whitespace
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: v0.5.2
7+
rev: v0.5.4
88
hooks:
99
- id: ruff
1010
args: [--fix, --exit-non-zero-on-fix]
@@ -17,7 +17,7 @@ repos:
1717
1818
1919
- repo: https://github.com/pre-commit/mirrors-mypy
20-
rev: v1.10.1
20+
rev: v1.11.0
2121
hooks:
2222
- id: mypy
2323
additional_dependencies:

src/scanpydoc/elegant_typehints/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def x() -> Tuple[int, float]:
4343
.. _sphinx issue 4826: https://github.com/sphinx-doc/sphinx/issues/4826
4444
.. _sphinx-autodoc-typehints issue 38: https://github.com/tox-dev/sphinx-autodoc-typehints/issues/38
4545
46-
""" # noqa: D300, D301
46+
""" # noqa: D300
4747

4848
from __future__ import annotations
4949

@@ -103,7 +103,7 @@ def _init_vars(_app: Sphinx, config: Config) -> None:
103103
and config.annotate_defaults
104104
):
105105
# override default for “typehints_defaults”
106-
config.typehints_defaults = "braces" # type: ignore[attr-defined]
106+
config.typehints_defaults = "braces"
107107

108108

109109
@dataclass

src/scanpydoc/rtd_github_links/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _get_obj_module(qualname: str) -> tuple[Any, ModuleType]:
142142

143143
# retrieve object and find original module name
144144
mod = sys.modules[modname]
145-
obj = None if attr_path else mod
145+
obj: Any = None if attr_path else mod
146146
del modname
147147
for attr_name in attr_path:
148148
try:

tests/test_elegant_typehints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def fn_test(m: object) -> None: # pragma: no cover
262262
ids=lambda p: str(p).replace("typing.", ""),
263263
)
264264
def test_typing_classes(app: Sphinx, annotation: type) -> None:
265-
app.config.typehints_fully_qualified = True # type: ignore[attr-defined]
265+
app.config.typehints_fully_qualified = True
266266
name = (
267267
getattr(annotation, "_name", None)
268268
or getattr(annotation, "__name__", None)

0 commit comments

Comments
 (0)