Enums with only one member do not exhaustively match correctly #14264
Labels
bug
mypy got something wrong
topic-enum
topic-match-statement
Python 3.10's match statement
topic-reachability
Detecting unreachable code
Bug Report
Enums with only one member do not exhaustively
match
correctly.To Reproduce
Expected Behavior
No type checking errors.
Actual Behavior
Your Environment
mypy.ini
(and other config files): NoneAdditional Context
What's strange is that if the
Enum
has at least 2 members, everything works correctly:The text was updated successfully, but these errors were encountered: