MCPcopy
hub / github.com/msgspec/msgspec / decode

Method decode

tests/unit/test_convert.py:2048–2051  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

2046 @mapcls_and_from_attributes
2047 def test_struct_union(self, tag1, tag2, unknown, mapcls, from_attributes):
2048 def decode(msg):
2049 return convert(
2050 mapcls(msg), Union[Test1, Test2], from_attributes=from_attributes
2051 )
2052
2053 class Test1(Struct, tag=tag1):
2054 a: int

Callers 15

decodeFunction · 0.80
test_roundtrip_anyFunction · 0.80
test_roundtrip_typedFunction · 0.80
test_encode_enc_hookFunction · 0.80
test_decode_parse_errorFunction · 0.80
test_decode_dec_hookFunction · 0.80
__init_subclass__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected