Skip to content

Typing: fix MessageData annotations and modernize (TypedDict/slots) #49

Description

@ff225

Priority: Medium

Typing correctness and modernization.

Tasks

  • 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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions