-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PY3.11 | Pytype 2024.02.13] Pattern matching fail when not specifying all enum values #1591
Comments
Thanks for the report. Self-contained repro:
The issue with the catch-all case is a bug that was fixed in the latest release (version 2024.02.27). |
Oh wow, fantastic, lemme give it a go :) |
An error occured ( Traceback (most recent call last): from enum import Enum def Query(default): class Environment(Enum): class ListOut: def list_items( |
Pattern matching fail when not specifying all enum values:
The match is missing the following cases: Environment.UAT, tenant_api.models.Environment.TEST, tenant_api.models.Environment.PROD, tenant_api.models.Environment.DEV [incomplete-match]
See my simplified code below:
It clearly can't figure out that all cases of the enum are handled by the variable
e
.even adding a "catch all" case doesn't seem to cut it.
The text was updated successfully, but these errors were encountered: