I have the following type and cant figure how to annotate it:
[[str, int]]
I cant use List[List[str,int]]
due
TypeError: Parameters to generic types must be types. Got slice(<class 'str'>, typing.Any, None).
Can i use Tuple despite having a list [str, int]
: List[Tuple[str,int]]
?
And List[List[Union[str, int]]
does not reveal order: str
before int
. I try to annotate the https://redis.io/commands/xread response for redis-py