Skip to content

Commit

Permalink
feat: make websocket dataclasses sloted (#67)
Browse files Browse the repository at this point in the history
perf: make websocket dataclass sloted

This is now possible since the min python is 3.10
  • Loading branch information
bdraco authored Jun 16, 2024
1 parent e7e6d74 commit 58e42f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uiprotect/data/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
WS_HEADER_SIZE = 8


@dataclass
@dataclass(slots=True)
class WSPacketFrameHeader:
packet_type: int
payload_format: int
Expand All @@ -37,7 +37,7 @@ class WSAction(str, enum.Enum):
REMOVE = "remove"


@dataclass
@dataclass(slots=True)
class WSSubscriptionMessage:
action: WSAction
new_update_id: str
Expand Down

0 comments on commit 58e42f6

Please sign in to comment.