From d285a3479a06b3f85d21238d54f87028ecdafb78 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 26 Apr 2024 13:18:06 -0400 Subject: [PATCH] Make `.msg.types.Msg.pld: Raw` only, since `PldRx`.. --- tractor/msg/types.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tractor/msg/types.py b/tractor/msg/types.py index cb12432..63c0a46 100644 --- a/tractor/msg/types.py +++ b/tractor/msg/types.py @@ -56,6 +56,7 @@ log = get_logger('tractor.msgspec') PayloadT = TypeVar('PayloadT') +# TODO: PayloadMsg class Msg( Struct, Generic[PayloadT], @@ -81,7 +82,7 @@ class Msg( tree. ''' - cid: str|None # call/context-id + cid: str # call/context-id # ^-TODO-^: more explicit type? # -[ ] use UNSET here? # https://jcristharif.com/msgspec/supported-types.html#unset @@ -106,7 +107,7 @@ class Msg( # TODO: could also be set to `msgspec.Raw` if the sub-decoders # approach is preferred over the generic parameterization # approach as take by `mk_msg_spec()` below. - pld: PayloadT|Raw + pld: Raw class Aid(