Skip to content

Commit 4e0f22a

Browse files
Merge pull request #1809 from VWS-Python/ty
Add ty to pre-commit
2 parents 3c91f49 + 3641981 commit 4e0f22a

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
@@ -21,6 +21,8 @@ ci:
2121
- pyright
2222
- pyright-docs
2323
- pyright-verifytypes
24+
- ty
25+
- ty-docs
2426
- pyroma
2527
- ruff-check-fix
2628
- ruff-check-fix-docs
@@ -339,6 +341,24 @@ repos:
339341
pass_filenames: false
340342
types_or: [python]
341343

344+
- id: ty
345+
name: ty
346+
stages: [pre-push]
347+
entry: uv run --extra=dev ty check
348+
language: python
349+
types_or: [python, toml]
350+
pass_filenames: false
351+
additional_dependencies: [uv==0.9.5]
352+
353+
- id: ty-docs
354+
name: ty-docs
355+
stages: [pre-push]
356+
entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python
357+
--command="ty check"
358+
language: python
359+
types_or: [markdown, rst]
360+
additional_dependencies: [uv==0.9.5]
361+
342362
- id: yamlfix
343363
name: yamlfix
344364
entry: uv run --extra=dev yamlfix

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ optional-dependencies.dev = [
7171
"sphinx-pyproject==0.3.0",
7272
"sphinx-substitution-extensions==2025.11.17",
7373
"sphinxcontrib-spelling==8.0.2",
74+
"ty==0.0.1a34",
7475
"types-pyyaml==6.0.12.20250915",
7576
"vulture==2.14",
7677
"vws-python-mock==2025.3.10.1",

0 commit comments

Comments
 (0)