Changed WSMessage
to a tagged union of NamedTuple
-- by :user:`Dreamsorcerer`.
This change allows type checkers to know the precise type of data
after checking the type
attribute.
If accessing messages by tuple indexes, the order has now changed.
Code such as:
typ, data, extra = ws_message
will need to be changed to:
data, extra, typ = ws_message
No changes are needed if accessing by attribute name.