Repository navigation
Add pyrefly to test_typecheck port/board matrix as xfail - #926
Conversation
|
Also add the astral ty typechecker to the quality tests and the just recipe, and wire it into the test matrix as xfail |
|
Also add the astral ty typechecker to the quality tests and the just recipe, and wire it into the test matrix as xfail |
Added in 1b3b0b7 (see follow-up commit): new
Added in 7b74c4e: new |
|
@copilot , I see that the test_typecheck_stdlib_only() test do not yet incluse pyrefly nor ty . Or better - define the list of linters and their options once in a module, constant ( or ficture) and re-use that across test and test suites |
... Done in c.f. this commit: added |
There was a problem hiding this comment.
Pull request overview
Extends stub quality testing with experimental Pyrefly and ty support.
Changes:
- Adds Pyrefly and ty adapters and configuration.
- Adds both tools to the snippet matrix as non-strict xfails.
- Adds a dedicated Pyrefly test and documentation.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/quality_tests/typecheck.py |
Dispatches Pyrefly and ty checks. |
tests/quality_tests/typecheck_ty.py |
Converts ty results to the shared format. |
tests/quality_tests/typecheck_pyrefly.py |
Converts Pyrefly results to the shared format. |
tests/quality_tests/test_snippets.py |
Adds experimental matrix entries. |
tests/quality_tests/test_pyrefly.py |
Adds dedicated Pyrefly coverage. |
tests/quality_tests/readme.md |
Documents the new checkers. |
tests/quality_tests/feat_pyrefly/check_basics_01.py |
Provides a Pyrefly test snippet. |
tests/quality_tests/_configs/pyproject.toml |
Configures Pyrefly and ty. |
pyproject.toml |
Adds test dependencies. |
justfile |
Installs and selects the new checkers. |
Suppressed comments (2)
tests/quality_tests/typecheck_pyrefly.py:133
- An unexpected Pyrefly exit is converted to
[], which is indistinguishable from a successful run with no diagnostics.pyrefly_to_pyrightthen creates a zero-error report, so the matrix records an allowed XPASS and the dedicated suite passes even though Pyrefly never completed. Propagate execution and JSON-parsing failures instead; the xfail marker will still absorb them in the experimental matrix while the dedicated test can detect a broken adapter.
if result.returncode not in (0, 1):
log.error(f"Pyrefly failed with returncode {result.returncode}: {result.stderr}")
return []
tests/quality_tests/test_snippets.py:176
- The title and description scope this PR to wiring in Pyrefly, but this also adds
tyto the full port/board/feature matrix (plus a new adapter, dependency, config, docs, and install changes). That materially expands runtime and maintenance scope without being described. Either remove thetyadditions from this PR or update the PR metadata and validation plan to cover both checkers.
pytestconfig: pytest.Config,
):
if not snip_path_fx or not snip_path_fx.exists():
pytest.skip(f"no feature folder for {feature}")
caplog.set_level(logging.INFO)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Josverl <981654+Josverl@users.noreply.github.com>
Co-authored-by: Josverl <981654+Josverl@users.noreply.github.com>
Co-authored-by: Josverl <981654+Josverl@users.noreply.github.com>
Co-authored-by: Josverl <981654+Josverl@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
140d1a5 to
d67f9bb
Compare
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: GitHub <noreply@github.com>
It supports weekly Sunday runs and manual GitHub UI dispatch, installs .[test] with uv, regenerates reports, removes stale reports, and commits only typecheck_report*.md changes Signed-off-by: GitHub <noreply@github.com>
pyreflysupport existed in the typecheck harness (typecheck.py,typecheck_pyrefly.py) but was never wired into the parametrizedtest_typecheckmatrix that runspyright/mypy/ruffacross every stub version/port/board/feature combination.Changes
tests/quality_tests/test_snippets.py: addedpyreflyto thelinterparametrization fortest_typecheck, markedxfail(strict=False)since pyrefly support is experimental — mirrors the pattern already used for the commented-outbasiliskentry.This exercises
pyreflyagainst the full port/board/feature snippet matrix without failing CI on known gaps.