Large unnamed inline Union types impacts developer ergonomics
perlow opened this issue · comments
An example of this is LastEvaluatedKey
of ScanOutputTableTypeDef
. It has the inline-type
Dict[
str,
Union[
bytes,
bytearray,
str,
int,
Decimal,
bool,
Set[int],
Set[Decimal],
Set[str],
Set[bytes],
Set[bytearray],
Sequence[Any],
Mapping[str, Any],
None,
],
]
This means that if code calling table.scan
needs to return this to its caller, it needs to replicate that very large type definition. Ideally, this would be a named type like LastEvaluatedKeyTypeDef which could then be referenced in application code.
where is this? Are you sure this is aiobotocore and not botocore?
Sorry I meant to file this in https://github.com/youtype/mypy_boto3_builder.