fixed mypy errors

This commit is contained in:
Tim Rid 2021-05-22 17:32:23 +02:00
parent 3811437219
commit c9d6f58fd4

View file

@ -33,7 +33,7 @@ class TContainerMixin:
setattr(self, key, value)
@recursion_lock()
def __str__(self):
def __str__(self) -> str:
indentation = "\n "
text = [f"{self.__class__.__name__}: "]
@ -206,7 +206,12 @@ class TStruct(Adapter[t.Any, t.Any, ContainerType, ContainerType]):
)
def TBitStruct(container_type: t.Type[ContainerType], reverse: bool = False):
def TBitStruct(
container_type: t.Type[ContainerType], reverse: bool = False
) -> t.Union[
cs.Transformed[ContainerType, ContainerType],
cs.Restreamed[ContainerType, ContainerType],
]:
return cs.Bitwise(TStruct(container_type, reverse))