Skip to content

Make pyrefly non-exhaustive-match an error#2916

Merged
adamtheturtle merged 3 commits intomainfrom
pyrefly-non-exhaustive-match-error
Feb 15, 2026
Merged

Make pyrefly non-exhaustive-match an error#2916
adamtheturtle merged 3 commits intomainfrom
pyrefly-non-exhaustive-match-error

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 15, 2026

  • Configure pyrefly to treat non-exhaustive-match as an error instead of a warning so it fails the build.
  • Add wildcard case _: branches to match statements to make them exhaustive.

Note

Medium Risk
Workflow changes affect the release pipeline (tag/checkout, PyPI and Docker publishing) and could break releases if outputs/refs are miswired; code changes are low-impact but touch runtime enum matching paths.

Overview
Hardens static analysis by configuring pyrefly to treat non-exhaustive-match as an error, and updates the affected match statements in target_manager.py, vws.py, and vwq.py to include a case _: fallback that raises ValueError.

Refactors the release GitHub Action by splitting the workflow into release (tag + GitHub release), pypi (build/publish to PyPI), and docker (build/push images) jobs, wiring them via job outputs so publishing builds from the exact release tag/version (and no longer manually git checkouts).

Written by Cursor Bugbot for commit fc05712. This will update automatically on new commits. Configure here.

adamtheturtle and others added 3 commits February 15, 2026 08:49
- Configure pyrefly to treat non-exhaustive-match as an error instead of
  a warning so it fails the build.
- Add wildcard case branches to match statements to make them exhaustive.
@adamtheturtle adamtheturtle merged commit 0e2ef17 into main Feb 15, 2026
15 checks passed
@adamtheturtle adamtheturtle deleted the pyrefly-non-exhaustive-match-error branch February 15, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments