From 7b91810e714711a1fd3e075415fac7063f55eb48 Mon Sep 17 00:00:00 2001 From: Tim Rid <6593626+timrid@users.noreply.github.com> Date: Sat, 2 Jan 2021 23:04:19 +0100 Subject: [PATCH] shorten name and removed name conflicts with the normal construct package --- construct_typed/__init__.py | 4 ++-- construct_typed/helper.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/construct_typed/__init__.py b/construct_typed/__init__.py index d5775c1..19c09bd 100644 --- a/construct_typed/__init__.py +++ b/construct_typed/__init__.py @@ -9,7 +9,7 @@ from .generic_wrapper import ( from .tenum import EnumBase, FlagsEnumBase, TEnum, TFlagsEnum from .tstruct import TBitStruct, TStruct, TStructField, TContainerBase from .tunion import TUnion, TUnionField -from .helper import List, Optional +from .helper import List, Opt __all__ = [ "TStructField", @@ -28,6 +28,6 @@ __all__ = [ "PathType", "TFlagsEnum", "FlagsEnumBase", - "Optional", + "Opt", "List" ] diff --git a/construct_typed/helper.py b/construct_typed/helper.py index 8a2b8b0..1fac233 100644 --- a/construct_typed/helper.py +++ b/construct_typed/helper.py @@ -2,8 +2,8 @@ import typing as t from .generic_wrapper import ListContainer -OptionalType = t.TypeVar("OptionalType") +OptType = t.TypeVar("OptType") ListType = t.TypeVar("ListType") -Optional = t.Optional[OptionalType] +Opt = t.Optional[OptType] List = t.Union[ListContainer[ListType], t.List[ListType]] \ No newline at end of file