Skip to content

Commit dfb6d23

Browse files
committed
bugfix in numbers fields for version compat (use of | in types)
1 parent a255662 commit dfb6d23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pcapkit/corekit/fields/numbers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import enum
55
import math
6-
from typing import TYPE_CHECKING, Generic, TypeVar, cast
6+
from typing import TYPE_CHECKING, Generic, TypeVar, Union, cast
77

88
import aenum
99

@@ -330,7 +330,7 @@ class UInt8Field(NumberField):
330330
__signed__ = False
331331

332332

333-
class EnumField(NumberField[enum.IntEnum | aenum.IntEnum]):
333+
class EnumField(NumberField[Union[enum.IntEnum, aenum.IntEnum]]):
334334
"""Enumerated value for protocol fields.
335335
336336
Args:

0 commit comments

Comments
 (0)