Skip to content

Commit 20153a1

Browse files
chore(deps): update pre-commit hooks (#1189)
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.7](astral-sh/ruff-pre-commit@v0.14.3...v0.14.7) - [github.com/rbubley/mirrors-prettier: v3.6.2 → v3.7.3](rbubley/mirrors-prettier@v3.6.2...v3.7.3) - [github.com/pre-commit/mirrors-mypy: v1.18.2 → v1.19.0](pre-commit/mirrors-mypy@v1.18.2...v1.19.0) - [github.com/henryiii/check-sdist: v1.2.0 → v1.3.0](henryiii/check-sdist@v1.2.0...v1.3.0) - [github.com/henryiii/validate-pyproject-schema-store: 2025.11.02 → 2025.11.21](henryiii/validate-pyproject-schema-store@2025.11.02...2025.11.21) - [github.com/python-jsonschema/check-jsonschema: 0.34.1 → 0.35.0](python-jsonschema/check-jsonschema@0.34.1...0.35.0) - [github.com/scientific-python/cookie: 2025.11.10 → 2025.11.21](scientific-python/cookie@2025.11.10...2025.11.21) <!--pre-commit.ci end--> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 10de684 commit 20153a1

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
exclude: "^tests"
2626

2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.14.3
28+
rev: v0.14.7
2929
hooks:
3030
- id: ruff-check
3131
args: ["--fix", "--show-fixes"]
@@ -51,15 +51,15 @@ repos:
5151
exclude: ^src/scikit_build_core/resources/find_python
5252

5353
- repo: https://github.com/rbubley/mirrors-prettier
54-
rev: "v3.6.2"
54+
rev: "v3.7.3"
5555
hooks:
5656
- id: prettier
5757
types_or: [yaml, markdown, html, css, scss, javascript, json]
5858
args: [--prose-wrap=always]
5959
exclude: "^tests|src/scikit_build_core/resources/scikit-build.schema.json|^docs/projects.md"
6060

6161
- repo: https://github.com/pre-commit/mirrors-mypy
62-
rev: v1.18.2
62+
rev: v1.19.0
6363
hooks:
6464
- id: mypy
6565
exclude: |
@@ -90,7 +90,7 @@ repos:
9090
- types-setuptools>=70.1
9191

9292
- repo: https://github.com/henryiii/check-sdist
93-
rev: "v1.2.0"
93+
rev: "v1.3.0"
9494
hooks:
9595
- id: check-sdist
9696
args: [--inject-junk]
@@ -131,12 +131,12 @@ repos:
131131
additional_dependencies: ["cogapp>=3.5"]
132132

133133
- repo: https://github.com/henryiii/validate-pyproject-schema-store
134-
rev: 2025.11.02
134+
rev: 2025.11.21
135135
hooks:
136136
- id: validate-pyproject
137137

138138
- repo: https://github.com/python-jsonschema/check-jsonschema
139-
rev: 0.34.1
139+
rev: 0.35.0
140140
hooks:
141141
- id: check-dependabot
142142
- id: check-github-workflows
@@ -150,6 +150,6 @@ repos:
150150
- id: validate-cff
151151

152152
- repo: https://github.com/scientific-python/cookie
153-
rev: 2025.11.10
153+
rev: 2025.11.21
154154
hooks:
155155
- id: sp-repo-review

src/scikit_build_core/_compat/typing.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
else:
99
from typing import Annotated, get_args, get_origin
1010

11+
if sys.version_info < (3, 10):
12+
from typing_extensions import TypeAlias
13+
else:
14+
from typing import TypeAlias
15+
1116
if sys.version_info < (3, 11):
1217
if typing.TYPE_CHECKING:
1318
from typing_extensions import Self, assert_never
@@ -24,6 +29,7 @@ def assert_never(_: object) -> None:
2429
__all__ = [
2530
"Annotated",
2631
"Self",
32+
"TypeAlias",
2733
"assert_never",
2834
"get_args",
2935
"get_origin",

src/scikit_build_core/metadata/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,33 +79,33 @@ def _process_dynamic_metadata(field: str, action: Callable[[str], str], result:
7979
if not (isinstance(result, list) and all(isinstance(r, str) for r in result)):
8080
msg = f"Field {field!r} must be a list of strings"
8181
raise RuntimeError(msg)
82-
return [action(r) for r in result] # type: ignore[return-value]
82+
return [action(r) for r in result] # type: ignore[arg-type, return-value]
8383
if field in _DICT_STR_FIELDS | {"readme"}:
8484
if not isinstance(result, dict) or not all(
8585
isinstance(v, str) for v in result.values()
8686
):
8787
msg = f"Field {field!r} must be a dictionary of strings"
8888
raise RuntimeError(msg)
89-
return {action(k): action(v) for k, v in result.items()} # type: ignore[return-value]
89+
return {action(k): action(v) for k, v in result.items()} # type: ignore[arg-type, return-value]
9090
if field in _LIST_DICT_FIELDS:
9191
if not isinstance(result, list) or not all(
9292
isinstance(k, str) and isinstance(v, str)
9393
for d in result
94-
for k, v in d.items()
94+
for k, v in d.items() # type: ignore[union-attr]
9595
):
9696
msg = f"Field {field!r} must be a dictionary of strings"
9797
raise RuntimeError(msg)
98-
return [{k: action(v) for k, v in d.items()} for d in result] # type: ignore[return-value]
98+
return [{k: action(v) for k, v in d.items()} for d in result] # type: ignore[union-attr, return-value]
9999
if field == "entry-points":
100100
if not isinstance(result, dict) or not all(
101101
isinstance(d, dict)
102-
and all(isinstance(k, str) and isinstance(v, str) for k, v in d.items())
102+
and all(isinstance(k, str) and isinstance(v, str) for k, v in d.items()) # type: ignore[redundant-expr]
103103
for d in result.values()
104104
):
105105
msg = "Field 'entry-points' must be a dictionary of dictionary of strings"
106106
raise RuntimeError(msg)
107107
return {
108-
dk: {action(k): action(v) for k, v in dv.items()}
108+
dk: {action(k): action(v) for k, v in dv.items()} # type: ignore[union-attr]
109109
for dk, dv in result.items()
110110
} # type: ignore[return-value]
111111
if field == "optional-dependencies":

0 commit comments

Comments
 (0)