| 2671 | |
| 2672 | |
| 2673 | class BitEnumField(_BitField[Union[List[int], int]], _EnumField[int]): |
| 2674 | __slots__ = EnumField.__slots__ |
| 2675 | |
| 2676 | def __init__(self, |
| 2677 | name, # type: str |
| 2678 | default, # type: Optional[int] |
| 2679 | size, # type: int |
| 2680 | enum, # type: _EnumType[int] |
| 2681 | **kwargs # type: Any |
| 2682 | ): |
| 2683 | # type: (...) -> None |
| 2684 | _EnumField.__init__(self, name, default, enum) |
| 2685 | _BitField.__init__(self, name, default, size, **kwargs) |
| 2686 | |
| 2687 | def any2i(self, pkt, x): |
| 2688 | # type: (Optional[Packet], Any) -> Union[List[int], int] |
| 2689 | return _EnumField.any2i(self, pkt, x) |
| 2690 | |
| 2691 | def i2repr(self, |
| 2692 | pkt, # type: Optional[Packet] |
| 2693 | x, # type: Union[List[int], int] |
| 2694 | ): |
| 2695 | # type: (...) -> Any |
| 2696 | return _EnumField.i2repr(self, pkt, x) |
| 2697 | |
| 2698 | |
| 2699 | class BitLenEnumField(BitLenField, _EnumField[int]): |
no outgoing calls
no test coverage detected