I have a list
structure as a flattened input to a API
[point_x, point_y, thing_a, thing_b, thing_c]
This is quite a complex structure so I would like to make the types clear in python
from typing import Tuple
point = (int, int)
thing = (int, float, str)
TypeA = Tuple[point + thing]
This is a valid python type:
typing.Tuple[int, int, int, float, str]
However, MyPy does not like it.
"Invalid type alias: expression is not a valid typeMypyvalid-type"
The real structure I have is very complex and it’s helpful for devs to see how the structure is created.
How can I do this properly without MyPy causing errors
1