From ce4d64ed2fb8681d519b28df3e4c64f659a2a084 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 22 May 2024 15:18:45 -0400 Subject: [PATCH] Mk `MsgDec.spec_str` have a more compact ` --- tractor/msg/_codec.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tractor/msg/_codec.py b/tractor/msg/_codec.py index 6ba23b7..cd86552 100644 --- a/tractor/msg/_codec.py +++ b/tractor/msg/_codec.py @@ -162,7 +162,10 @@ class MsgDec(Struct): # TODO: would get moved into `FieldSpec.__str__()` right? @property def spec_str(self) -> str: - return pformat_msgspec(codec=self) + return pformat_msgspec( + codec=self, + join_char='|', + ) pld_spec_str = spec_str @@ -211,7 +214,7 @@ def mk_msgspec_table( msgtypes = [msgspec] msgt_table: dict[str, MsgType] = { - msgt: str(msgt) + msgt: str(msgt.__name__) for msgt in msgtypes } if msg: