Bug Report
As per the title, see the gist for an example. The issue does not occur when using Enum instead of StrEnum.
To Reproduce
https://mypy-play.net/?gist=cf9926c276e8fe0f48d7d20b7ebf2b6e
Expected Behavior
The output should be
main.py:12: note: Revealed type is "Literal['none']"
main.py:14: note: Revealed type is "__main__.Color"
Actual Behavior
The output is
main.py:12: note: Revealed type is "__main__.Color | Literal['none']"
main.py:14: note: Revealed type is "__main__.Color | Literal['none']"
Your Environment
- Mypy version used: 1.19.1