Skip to content

Commit b6b8624

Browse files
authored
Use ty instead of mypy for type checking (#14)
closes #9
1 parent 89c5c6b commit b6b8624

File tree

5 files changed

+35
-153
lines changed

5 files changed

+35
-153
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
with:
2222
enable-cache: true
2323
python-version: ${{ matrix.python }}
24-
- name: "Set up Python"
25-
run: uv python install ${{ matrix.python }}
2624
- name: Setup Clang
2725
uses: egor-tensin/setup-clang@v1
2826
with:
@@ -31,6 +29,6 @@ jobs:
3129
- name: Install the project
3230
run: uv sync
3331
- name: Type checks
34-
run: uv run mypy *.py --check-untyped-defs
32+
run: uv run ty check .
3533
- name: Tests
3634
run: uv run python -m unittest discover --verbose .

mypy.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Repository = "https://github.com/jbcoe/py_cppmodel"
1818
dev = [
1919
"ipython>=8.12.3",
2020
"jupyter>=1.1.1",
21-
"mypy>=1.19.1",
2221
"parameterized>=0.9.0",
2322
"pre-commit>=4.5.1",
23+
"ty>=0.0.14",
2424
]
2525

2626
[build-system]
@@ -62,3 +62,9 @@ force-single-line = true
6262

6363
[tool.ruff.format]
6464
quote-style = "double"
65+
66+
[[tool.ty.overrides]]
67+
include = ["py_cppmodel.py"]
68+
69+
[tool.ty.overrides.rules]
70+
unresolved-attribute = "ignore"

test.macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
uv sync
55

66
# Type checks
7-
uv run mypy *.py --check-untyped-defs
7+
uv run ty check .
88

99
# Unit tests
1010
uv run python -m unittest discover --verbose .

0 commit comments

Comments
 (0)