| 3910 | |
| 3911 | |
| 3912 | class UUIDEnumField(UUIDField, _EnumField[UUID]): |
| 3913 | __slots__ = EnumField.__slots__ |
| 3914 | |
| 3915 | def __init__(self, name, default, enum, uuid_fmt=0): |
| 3916 | # type: (str, Optional[int], Any, int) -> None |
| 3917 | _EnumField.__init__(self, name, default, enum, "16s") # type: ignore |
| 3918 | UUIDField.__init__(self, name, default, uuid_fmt=uuid_fmt) |
| 3919 | |
| 3920 | def any2i(self, pkt, x): |
| 3921 | # type: (Optional[Packet], Any) -> UUID |
| 3922 | return _EnumField.any2i(self, pkt, x) # type: ignore |
| 3923 | |
| 3924 | def i2repr(self, |
| 3925 | pkt, # type: Optional[Packet] |
| 3926 | x, # type: UUID |
| 3927 | ): |
| 3928 | # type: (...) -> Any |
| 3929 | return _EnumField.i2repr(self, pkt, x) |
| 3930 | |
| 3931 | |
| 3932 | class BitExtendedField(Field[Optional[int], int]): |
no outgoing calls
no test coverage detected