Skip to content

Commit 3b5bc77

Browse files
tyalieandreax79
authored andcommitted
Enum: Fix pytest errors with older python versions
Python 3.10 supports using `type[…]` or `tuple[…]` as type hints. This is relatively new and as such not support in older pythons Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
1 parent 942b62c commit 3b5bc77

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cstruct/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def __prepare__(metacls, cls, bases, **kwds):
286286
namespace.__class__ = metacls.WrapperDict
287287
return namespace
288288

289-
def __new__(metacls: type["CEnumMeta"], cls: str, bases: tuple[type, ...], classdict: _EnumDict, **kwds: Any) -> "CEnumMeta":
289+
def __new__(metacls: Type["CEnumMeta"], cls: str, bases: Tuple[Type, ...], classdict: _EnumDict, **kwds: Any) -> "CEnumMeta":
290290
inst = super().__new__(metacls, cls, bases, classdict, **kwds)
291291

292292
if len(inst) > 0:

0 commit comments

Comments
 (0)