Mk `MsgDec.spec_str` have a more compact `
parent
c6f599b1be
commit
ce4d64ed2f
|
@ -162,7 +162,10 @@ class MsgDec(Struct):
|
||||||
# TODO: would get moved into `FieldSpec.__str__()` right?
|
# TODO: would get moved into `FieldSpec.__str__()` right?
|
||||||
@property
|
@property
|
||||||
def spec_str(self) -> str:
|
def spec_str(self) -> str:
|
||||||
return pformat_msgspec(codec=self)
|
return pformat_msgspec(
|
||||||
|
codec=self,
|
||||||
|
join_char='|',
|
||||||
|
)
|
||||||
|
|
||||||
pld_spec_str = spec_str
|
pld_spec_str = spec_str
|
||||||
|
|
||||||
|
@ -211,7 +214,7 @@ def mk_msgspec_table(
|
||||||
msgtypes = [msgspec]
|
msgtypes = [msgspec]
|
||||||
|
|
||||||
msgt_table: dict[str, MsgType] = {
|
msgt_table: dict[str, MsgType] = {
|
||||||
msgt: str(msgt)
|
msgt: str(msgt.__name__)
|
||||||
for msgt in msgtypes
|
for msgt in msgtypes
|
||||||
}
|
}
|
||||||
if msg:
|
if msg:
|
||||||
|
|
Loading…
Reference in New Issue