mypy
aa7733a1 - Don't use equality to narrow when value is IntEnum/StrEnum (#17866)

Commit
1 year ago
Don't use equality to narrow when value is IntEnum/StrEnum (#17866) IntEnum/StrEnum values compare equal to the corresponding int/str values, which breaks the logic we use for narrowing based on equality to a literal value. Special case IntEnum/StrEnum to avoid the incorrect behavior. Fix #17860.
Author
Parents
Loading