Skip to content

Commit 1a90ba0

Browse files
committed
Add ty type checker to CI
1 parent ec2dd8b commit 1a90ba0

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ jobs:
3232

3333
- name: Type check (mypy)
3434
run: uv run mypy tests
35+
36+
- name: Type check (ty)
37+
run: uv run ty check tests typings

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ dev = [
5959
"pycurl>=7.45.7",
6060
"confluent-kafka>=2.12.2",
6161
"google-cloud-monitoring>=2.28.0",
62+
"ty>=0.0.11",
6263
]
6364

6465

@@ -120,6 +121,17 @@ warn_unreachable = true
120121
strict_equality = true
121122
ignore_missing_imports = false
122123

124+
[tool.ty.environment]
125+
python-version = "3.10"
126+
127+
[tool.ty.analysis]
128+
# Don't respect `type: ignore` comments - those are for mypy.
129+
# ty should only use `ty: ignore` comments.
130+
respect-type-ignore-comments = false
131+
132+
[tool.ty.rules]
133+
unused-ignore-comment = "error"
134+
123135
[tool.ruff.lint]
124136
select = ["ALL"]
125137
ignore = [

uv.lock

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

0 commit comments

Comments
 (0)