From f4bea2d1ded1a34f6848e3f48fe0283a407d3b00 Mon Sep 17 00:00:00 2001 From: Anthony Carapetis Date: Sat, 10 Aug 2024 16:46:30 +1000 Subject: [PATCH] Don't use slots in dataclasses This wasn't added until 3.10 --- shroudstone/replay.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shroudstone/replay.py b/shroudstone/replay.py index 29a5f02..0612eff 100755 --- a/shroudstone/replay.py +++ b/shroudstone/replay.py @@ -216,7 +216,7 @@ class AIType(IntEnum): MurderBotSr = 2 -@dataclass(slots=True) +@dataclass() class Slot: type: SlotType = SlotType.Human faction: Faction = Faction(0) @@ -240,7 +240,7 @@ class MatchType(IntEnum): Coop3ve = 3 -@dataclass(slots=True) +@dataclass() class Client: uuid: UUID client_id: int @@ -251,7 +251,7 @@ class Client: left_game_reason: LeftGameReason = LeftGameReason.Unknown -@dataclass(slots=True) +@dataclass() class SlotAssignment: slot_number: int nickname: str @@ -261,7 +261,7 @@ def parse_uuid(uuid: pb.UUID) -> UUID: return UUID(bytes=struct.pack(">QQ", uuid.part1, uuid.part2)) -@dataclass(slots=True) +@dataclass() class GameState: """Stormgate match state machine - reads commands from replay and updates state"""