Open
Description
I am working on feature where reveal_type(1 + 2)
will reveal Literal[3]
.
Types that I want to support:
int
str
bool
And these operations:
_SUPPORTED_LITERAL_OPERATIONS: Final = {
int: ('+', '-', '*', '//'), # `/` returns `float`
str: ('+',),
bool: ('and', 'or'),
}
So, True or False
is revealed as Literal[True]
.
I will finish some test later today and send a PR in the morning.