Skip to content

Commit e2c497b

Browse files
authored
feat(checks): accept ty in PC140 type checker check (#804)
Add https://github.com/astral-sh/ty-pre-commit alongside mypy and pyrefly as an accepted type checker hook. Assisted-by: ClaudeCode:claude-opus-4.8
1 parent a6eb4c2 commit e2c497b

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/sp_repo_review/checks/precommit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ class PC140(PreCommit):
118118
repos = {
119119
"https://github.com/pre-commit/mirrors-mypy",
120120
"https://github.com/facebook/pyrefly-pre-commit",
121+
"https://github.com/astral-sh/ty-pre-commit",
121122
}
122123

123124

tests/test_precommit.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ def test_pc140_pyrefly():
142142
assert compute_check("PC140", precommit=precommit).result
143143

144144

145+
def test_pc140_ty():
146+
precommit = yaml.safe_load("""
147+
repos:
148+
- repo: https://github.com/astral-sh/ty-pre-commit
149+
""")
150+
assert compute_check("PC140", precommit=precommit).result
151+
152+
145153
def test_pc160_codespell():
146154
precommit = yaml.safe_load("""
147155
repos:

0 commit comments

Comments
 (0)