MCPcopy Index your code
hub / github.com/danielgtaylor/python-betterproto / WithCollections

Class WithCollections

tests/test_features.py:58–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57 @dataclass
58 class WithCollections(betterproto.Message):
59 test_list: List[str] = betterproto.string_field(1)
60 test_map: Dict[str, str] = betterproto.map_field(
61 2, betterproto.TYPE_STRING, betterproto.TYPE_STRING
62 )
63
64 # Is always set from parse, even if all collections are empty
65 with_collections_empty = WithCollections().parse(bytes(WithCollections()))

Callers 1

test_has_fieldFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_has_fieldFunction · 0.68