Skip to content

Commit 51caa13

Browse files
Migrate from mypy to ty (#292)
1 parent 49910c6 commit 51caa13

5 files changed

Lines changed: 42 additions & 204 deletions

File tree

.github/workflows/typing.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ env:
1111
DEFAULT_PYTHON: "3.12"
1212

1313
jobs:
14-
mypy:
15-
name: mypy
14+
ty:
15+
name: ty
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: ⤵️ Check out code from GitHub
@@ -31,5 +31,5 @@ jobs:
3131
poetry config virtualenvs.in-project true
3232
- name: 🏗 Install dependencies
3333
run: poetry install --no-interaction
34-
- name: 🚀 Run mypy
35-
run: poetry run mypy examples src tests
34+
- name: 🚀 Run ty
35+
run: poetry run ty check examples src tests

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ repos:
7777
types: [text]
7878
entry: poetry run end-of-file-fixer
7979
stages: [commit, push, manual]
80+
- id: ty
81+
name: 🆎 Static type checking using ty
82+
language: system
83+
types: [python]
84+
entry: poetry run ty check
8085
- id: no-commit-to-branch
8186
name: 🛑 Don't commit to main branch
8287
language: system

0 commit comments

Comments
 (0)