From f64f1cac6cc0c938ed2ba2ddbb44a7f28dfe5bfc Mon Sep 17 00:00:00 2001 From: Tim Rid <6593626+timrid@users.noreply.github.com> Date: Wed, 24 Mar 2021 20:19:15 +0100 Subject: [PATCH] fixed __new__ --- construct_typed/tenum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/construct_typed/tenum.py b/construct_typed/tenum.py index e02a688..7c93e33 100644 --- a/construct_typed/tenum.py +++ b/construct_typed/tenum.py @@ -46,7 +46,7 @@ class TEnum(Adapter[int, int, EnumType, EnumType]): def __new__( cls, subcon: Construct[int, int], enum_type: t.Type[EnumType] - ) -> Adapter[int, int, EnumType, EnumType]: + ) -> "TEnum[EnumType]": ... def __init__(self, subcon: Construct[int, int], enum_type: t.Type[EnumType]): @@ -94,7 +94,7 @@ class TFlagsEnum(Adapter[int, int, FlagsEnumType, FlagsEnumType]): def __new__( cls, subcon: Construct[int, int], enum_type: t.Type[FlagsEnumType] - ) -> Adapter[int, int, FlagsEnumType, FlagsEnumType]: + ) -> "TFlagsEnum[FlagsEnumType]": ... def __init__(self, subcon: Construct[int, int], enum_type: t.Type[FlagsEnumType]):