Closed erictraut closed 1 week ago
This comes from a mypy issue: https://github.com/python/mypy/issues/17493
The following code should generate an error:
from enum import Enum from typing import Final, Literal class Marker(Enum): unspecified = 0 unspecified: Final = Marker.unspecified def func(value: int | Literal[unspecified] = unspecified) -> None: # error: Parameter 1 of Literal[...] is invalid [valid-type] ...
This is addressed in pyright 1.1.371.
This comes from a mypy issue: https://github.com/python/mypy/issues/17493
The following code should generate an error: