Skip to content

Commit 8bccda9

Browse files
feat: replace mypy with ty type checker for testing
- Replace mypy dependency with ty in pyproject.toml - Remove mypy.ini configuration file - Add ty.src configuration with exclude patterns - Update CI workflow from mypy-check to ty-check - Update type-check Poe task to use ty check command - Exclude bin, docs, and unit_tests directories from ty checking This change enables testing of the new Rust-based ty type checker as an alternative to mypy for performance and usability evaluation. Co-Authored-By: AJ Steers <[email protected]>
1 parent a59d25f commit 8bccda9

File tree

3 files changed

+9
-33
lines changed

3 files changed

+9
-33
lines changed

.github/workflows/python_lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ jobs:
5353
- name: Check code format
5454
run: poetry run ruff format --diff .
5555

56-
mypy-check:
57-
name: MyPy Check
56+
ty-check:
57+
name: Ty Check
5858
runs-on: ubuntu-24.04
5959
steps:
6060
# Common steps:
@@ -74,5 +74,5 @@ jobs:
7474

7575
# Job-specific step(s):
7676

77-
- name: Run mypy
78-
run: poetry run mypy --config-file mypy.ini airbyte_cdk
77+
- name: Run ty
78+
run: poetry run ty check airbyte_cdk

mypy.ini

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

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ dateparser = "^1.2.2"
9696

9797
[tool.poetry.group.dev.dependencies]
9898
freezegun = "*"
99-
mypy = "*"
99+
ty = "*"
100100
asyncio = "3.4.3"
101101
ruff = "^0.11.5"
102102
pdoc = "^15.0.0"
@@ -129,6 +129,9 @@ source-declarative-manifest = "airbyte_cdk.cli.source_declarative_manifest:run"
129129

130130
# Ruff configuration moved to ruff.toml
131131

132+
[tool.ty.src]
133+
exclude = ["bin", "docs", "unit_tests"]
134+
132135
[tool.poe.tasks]
133136
# Installation
134137
install = { shell = "poetry install --all-extras", help = "Install all dependencies." }
@@ -154,7 +157,7 @@ _format-fix-prettier = {cmd = "npx prettier . --write", help = "Format with pret
154157

155158
# Linting/Typing check tasks
156159
lint = {cmd = "poetry run ruff check .", help = "Lint with Ruff."}
157-
type-check = {cmd = "poetry run mypy airbyte_cdk", help = "Type check modified files with mypy."}
160+
type-check = {cmd = "poetry run ty check airbyte_cdk", help = "Type check with ty."}
158161

159162
# Linting/Typing fix tasks
160163
lint-fix = { cmd = "poetry run ruff check --fix .", help = "Auto-fix any lint issues that Ruff can automatically resolve (excluding 'unsafe' fixes) with Ruff." }

0 commit comments

Comments
 (0)