Skip to content

Replace Mypy with Ty type checker #1152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/mypy.yml → .github/workflows/ty.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Mypy Checks
name: Ty Type Checks

on:
pull_request:
Expand All @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

jobs:
mypy:
ty:
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down Expand Up @@ -38,11 +38,8 @@ jobs:
done
echo "python_files=${python_files[*]}" >> $GITHUB_ENV

- name: Add MyPy annotator
uses: pr-annotators/mypy-pr-annotator@v1.0.0

- name: Run mypy
- name: Run ty
if: ${{ env.python_files != '' }}
run: |
echo "Running mypy on changed files: ${{ env.python_files }}"
uv run mypy --no-pretty --show-absolute-path ${{ env.python_files }}
echo "Running ty on changed files: ${{ env.python_files }}"
uv run ty check --output-format concise --python-version 3.12 --exclude "**/tests/**" --exclude "**/codegen_tests/**" ${{ env.python_files }}
51 changes: 0 additions & 51 deletions mypy.ini

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ dev-dependencies = [
"pytest>=8.3.3",
"pytest-cov>=6.1.0,<6.1.1",
"ruff>=0.6.8",
"mypy[mypyc,faster-cache]>=1.13.0",
"ty>=0.0.1a10",
"pre-commit>=4.0.1",
"pytest-xdist>=3.6.1,<4.0.0",
"pytest-mock<4.0.0,>=3.14.0",
Expand Down
5 changes: 5 additions & 0 deletions ty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ty type checker configuration
# Based on the previous mypy.ini configuration

# Basic configuration - ty is still in early development
# so configuration options are limited
Loading