As of now, typing.Literal nor enum.Enum are supported when using the type validation API. This is an important feature that should be ready before #10 is complete.
Improvement Request Example API
from view import compile_type
from enum import Enum
class MyEnum(Enum):
A = 1
B = 2
tp = compile_type(MyEnum)
tp.cast("1") # MyEnum.A
tp.cast("A") # MyEnum.A
Improvement Description
As of now,
typing.Literal
norenum.Enum
are supported when using the type validation API. This is an important feature that should be ready before #10 is complete.Improvement Request Example API
And with literals:
Anything else?
No response