main.py:10: note: Revealed type is "Literal[__main__.Op.A]"
main.py:13: note: Revealed type is "Literal[__main__.Op.B]"
Actual Behavior
main.py:10: note: Revealed type is "__main__.Op"
main.py:13: note: Revealed type is "Literal[__main__.Op.B]"
main.py:16: error: Argument 1 to "assert_never" has incompatible type "Literal[Op.A]"; expected "Never" [arg-type]
Activity
sherlock2215 commented on Nov 14, 2025
Heyy, @dimastbk can I be assigned to this issue?
I'm ready to set up the development environment and start investigating the type narrowing logic.
A5rocks commented on Nov 15, 2025
Feel free to try, no assignment necessary.
fixed Incorrect type of enum in 'if' clause python#20234
Narrow types based on collection containment (python#20602)