Not sure if the title is 100% right, but it's simpler to explain using the following example:
class MyObject1:
...
class MyObject2:
...
@dataclass
class DataClass:
source1: MyType[MyObject1]
source2: MyType[MyObject2]
In this case, I'm looking for MyType to be something like:
MyType[T] = AliasTo(Union[T, str, None])
I feel like it could possibly be implemented using Generic but I can't make my head around how to do it.
(I'm using Python 3.8)
