You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix MessageData dataclass annotations, which are wrong: payload: str is actually bytes; device_id: int is a str; message_id: int is a str; message_content: str is a dict; timestamp: str is a float. Dynamically-added attributes (received_timestamp, avg_speed, …) are class variables defaulting to None instead of real dataclass fields.
Adopt TypedDict for recurring config structures and dataclass(slots=True) where beneficial (project requires Python ≥3.12).
Files
src/server/communication/message_data.py
recurring config structures
From the Feature 042 codebase review (recommendations #5, #15).
Priority: Medium
Typing correctness and modernization.
Tasks
MessageDatadataclass annotations, which are wrong:payload: stris actually bytes;device_id: intis a str;message_id: intis a str;message_content: stris a dict;timestamp: stris a float. Dynamically-added attributes (received_timestamp,avg_speed, …) are class variables defaulting toNoneinstead of real dataclass fields.TypedDictfor recurring config structures anddataclass(slots=True)where beneficial (project requires Python ≥3.12).Files
src/server/communication/message_data.pyFrom the Feature 042 codebase review (recommendations #5, #15).