Skip to content

Commit f616003

Browse files
committed
Switch from mypy to ty and update .gitignore
- Replace mypy with ty (Astral's new type checker) using uv commands - Update .gitignore to exclude build artifacts, .venv, and .python-version - Update GitHub workflow from mypy to ty - Update tool configuration in pyproject.toml - Update UV_MIGRATION.md documentation
1 parent 4e6d3db commit f616003

File tree

5 files changed

+636
-14
lines changed

5 files changed

+636
-14
lines changed

.github/workflows/mypy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: mypy
1+
name: ty
22

33
on:
44
push:
@@ -30,5 +30,5 @@ jobs:
3030
- name: Install dependencies
3131
run: uv sync --all-extras
3232

33-
- name: Run mypy
34-
run: uv run mypy src
33+
- name: Run ty
34+
run: uv run ty check src

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,16 @@ data/players/
1010
data/world/instances/
1111
instance_tracker.txt
1212
*.egg-info/
13+
14+
# Build artifacts
15+
build/
16+
dist/
17+
*.egg
18+
.eggs/
19+
20+
# UV
21+
.venv/
22+
uv.lock
23+
24+
# Python version
25+
.python-version

UV_MIGRATION.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ uv run pytest
6666
# Run tests with coverage
6767
uv run pytest --cov=rom24
6868

69-
# Run mypy type checking
70-
uv run mypy src
69+
# Run ty type checking (Astral's new type checker)
70+
uv run ty check src
7171

7272
# Run black formatter
7373
uv run black src
@@ -117,6 +117,7 @@ uv lock --upgrade-package package-name
117117
- The entry point `rom24` is defined in `[project.scripts]`
118118
- Python 3.12+ is required (down from 3.14 in the old config)
119119
- All GitHub Actions workflows now use UV for faster CI/CD
120+
- Using `ty` (Astral's new type checker) instead of mypy
120121

121122
## Troubleshooting
122123

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ dependencies = [
1515
dev = [
1616
"black>=24.10.0",
1717
"ipdb>=0.13.13",
18-
"mypy>=1.14.1",
1918
"pre-commit>=4.0.1",
2019
"pytest>=9.0.2",
2120
"pytest-xdist>=3.6.1",
2221
"pytest-cov>=6.0.0",
2322
"ruff>=0.8.4",
23+
"ty>=0.0.14",
2424
]
2525

2626
[project.scripts]
@@ -45,11 +45,8 @@ ignore = ["E501"] # Line too long (handled by formatter)
4545
line-length = 120
4646
target-version = ["py312"]
4747

48-
[tool.mypy]
48+
[tool.ty]
4949
python_version = "3.12"
50-
warn_return_any = true
51-
warn_unused_configs = true
52-
disallow_untyped_defs = false
5350

5451
[tool.pytest.ini_options]
5552
testpaths = ["tests"]

0 commit comments

Comments
 (0)