You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
variance okay for literals, but not expressions ([1, 2] okay for list[int | None] but [1] + [2] is error) #16623
Apologies if this is a repeat / common issue. I couldn't find anything in the docs. This is popping up for me a lot, my interpretation is that mypy allows type invariance on literals that it will not for expressions.
Activity
glenrobertson commentedon Dec 5, 2023
+1 also experiencing this issue! any help would be greatly appreciated.