Skip to content

Commit

Permalink
bugfix in numbers fields for version compat (use of | in types)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarryShaw committed Jun 5, 2023
1 parent a255662 commit dfb6d23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcapkit/corekit/fields/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import enum
import math
from typing import TYPE_CHECKING, Generic, TypeVar, cast
from typing import TYPE_CHECKING, Generic, TypeVar, Union, cast

import aenum

Expand Down Expand Up @@ -330,7 +330,7 @@ class UInt8Field(NumberField):
__signed__ = False


class EnumField(NumberField[enum.IntEnum | aenum.IntEnum]):
class EnumField(NumberField[Union[enum.IntEnum, aenum.IntEnum]]):
"""Enumerated value for protocol fields.
Args:
Expand Down

0 comments on commit dfb6d23

Please sign in to comment.