Skip to content

Commit 043676d

Browse files
committed
Switch to official ty hook
1 parent 4a4f04c commit 043676d

3 files changed

Lines changed: 20 additions & 53 deletions

File tree

.pre-commit-config.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ci:
1212
autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
1313
autoupdate_schedule: quarterly
1414
autofix_commit_msg: "🎨 pre-commit fixes"
15-
skip: [ty-check]
15+
skip: [ty]
1616

1717
repos:
1818
## Standard hooks
@@ -130,22 +130,17 @@ repos:
130130
- repo: https://github.com/astral-sh/ruff-pre-commit
131131
rev: v0.15.16
132132
hooks:
133-
- id: ruff-format
134-
types_or: [python, pyi, jupyter, markdown]
135-
priority: 6
136133
- id: ruff-check
137134
require_serial: true
135+
priority: 6
136+
- id: ruff-format
137+
types_or: [python, pyi, jupyter, markdown]
138138
priority: 7
139139

140140
## Check Python types with ty
141-
- repo: local
141+
- repo: https://github.com/astral-sh/ty-pre-commit
142+
rev: v0.0.47
142143
hooks:
143-
- id: ty-check
144-
name: ty check
145-
entry: uvx python -c "import subprocess; import sys; r = subprocess.run(['uv', 'sync', '--no-install-project', '--inexact']); sys.exit(r.returncode or subprocess.run(['uv', 'run', '--no-sync', 'ty', 'check']).returncode)"
146-
language: unsupported
147-
require_serial: true
148-
types_or: [python, pyi, jupyter]
149-
exclude: ^(docs/)
150-
pass_filenames: false
144+
- id: ty
145+
args: [--only-dev]
151146
priority: 8

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,12 @@ test = [
319319
"pytest-console-scripts>=1.4.1",
320320
"pytest-sugar>=1.1.1",
321321
"pytest-xdist>=3.8.0",
322-
]
323-
typing = [
324-
"ty==0.0.40",
325322
"numpy>=2.1",
323+
"numpy>=2.3.2; python_version >= '3.14'",
326324
"qiskit>=1.2.4",
327325
"scipy>=1.13.1",
326+
"scipy>=1.15; python_version >= '3.13'",
327+
"scipy>=1.16.2; python_version >= '3.14'",
328328
]
329329
docs = [
330330
"breathe>=4.36.0",
@@ -347,6 +347,5 @@ docs = [
347347
dev = [
348348
{include-group = "build"},
349349
{include-group = "test"},
350-
{include-group = "typing"},
351350
"nox>=2025.11.12",
352351
]

uv.lock

Lines changed: 9 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)