Skip to content

Commit b1f3458

Browse files
authored
👷 Add ty to precommit (#503)
* remove lint from test as it's already covered in precommit * add ty to pyproject, precommit and lint script * let ty ignore the ignore statement for mypy * add ty to uv lock * fix alphabetical order * fix issue from merge conflict * fix one more issue from merge conflict
1 parent 7cf74e2 commit b1f3458

File tree

6 files changed

+38
-4
lines changed

6 files changed

+38
-4
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ jobs:
6868
limit-access-to-actor: true
6969
- name: Install Dependencies
7070
run: uv sync --no-dev --group tests
71-
- name: Lint
72-
if: ${{ matrix.uv-resolution == 'highest' }}
73-
run: uv run bash scripts/lint.sh
7471
- run: mkdir coverage
7572
- name: Test
7673
run: uv run bash scripts/test.sh

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ repos:
3535
language: unsupported
3636
pass_filenames: false
3737

38+
- id: local-ty
39+
name: ty check
40+
entry: uv run ty check asyncer
41+
require_serial: true
42+
language: unsupported
43+
pass_filenames: false
44+
3845
- id: generate-readme
3946
language: unsupported
4047
name: generate README.md from index.md

asyncer/_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def create_task_group() -> "TaskGroup":
181181

182182
LibTaskGroup = get_asynclib().TaskGroup
183183

184-
class ExtendedTaskGroup(LibTaskGroup, TaskGroup): # type: ignore
184+
class ExtendedTaskGroup(LibTaskGroup, TaskGroup): # type: ignore # ty: ignore[unused-ignore-comment]
185185
pass
186186

187187
return ExtendedTaskGroup()

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ tests = [
7878
"mypy >=1.19.1",
7979
"pytest >=9.0.0",
8080
"ruff >=0.15.6",
81+
"ty >=0.0.9",
8182
]
8283

8384
[tool.pdm]

scripts/lint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ set -e
44
set -x
55

66
mypy asyncer
7+
ty check asyncer
78
ruff check asyncer tests docs_src
89
ruff format asyncer tests docs_src --check

uv.lock

Lines changed: 28 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)