Skip to content

Commit 0a7b511

Browse files
committed
Add ty to pre-commit
1 parent ac00c49 commit 0a7b511

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ ci:
3232
- shfmt-docs
3333
- spelling
3434
- sphinx-lint
35+
- ty
36+
- ty-docs
3537
- vulture
3638
- vulture-docs
3739
- yamlfix
@@ -194,6 +196,24 @@ repos:
194196
types_or: [python]
195197
additional_dependencies: [uv==0.9.5]
196198

199+
- id: ty
200+
name: ty
201+
stages: [pre-push]
202+
entry: uv run --extra=dev ty check
203+
language: python
204+
types_or: [python, toml]
205+
pass_filenames: false
206+
additional_dependencies: [uv==0.9.5]
207+
208+
- id: ty-docs
209+
name: ty-docs
210+
stages: [pre-push]
211+
entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python
212+
--command="ty check"
213+
language: python
214+
types_or: [markdown, rst]
215+
additional_dependencies: [uv==0.9.5]
216+
197217
- id: vulture
198218
name: vulture
199219
entry: uv run --extra=dev -m vulture .

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ optional-dependencies.dev = [
6969
"sphinx-pyproject==0.3.0",
7070
"sphinx-substitution-extensions==2025.11.17",
7171
"sphinxcontrib-spelling==8.0.2",
72+
"ty==0.0.1a32",
7273
"types-pyyaml==6.0.12.20250915",
7374
"vulture==2.14",
7475
"yamlfix==1.19.0",

0 commit comments

Comments
 (0)