Skip to content

Commit e5cb1bc

Browse files
committed
feat: allow pyrefly instead of mypy
Assisted-by: OpenCode:glm-5.1 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 4338c55 commit e5cb1bc

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/sp_repo_review/checks/precommit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ class PC190(PreCommit):
115115
class PC140(PreCommit):
116116
"Uses a type checker"
117117

118-
repos = {"https://github.com/pre-commit/mirrors-mypy"}
118+
repos = {
119+
"https://github.com/pre-commit/mirrors-mypy",
120+
"https://github.com/facebook/pyrefly-pre-commit",
121+
}
119122

120123

121124
class PC160(PreCommit):

tests/test_precommit.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ def test_pc140():
134134
assert compute_check("PC140", precommit=precommit).result
135135

136136

137+
def test_pc140_pyrefly():
138+
precommit = yaml.safe_load("""
139+
repos:
140+
- repo: https://github.com/facebook/pyrefly-pre-commit
141+
""")
142+
assert compute_check("PC140", precommit=precommit).result
143+
144+
137145
def test_pc160_codespell():
138146
precommit = yaml.safe_load("""
139147
repos:

0 commit comments

Comments
 (0)