MCPcopy
hub / github.com/danielgtaylor/python-betterproto / _get_wrapper

Function _get_wrapper

src/betterproto/__init__.py:2010–2025  ·  view source on GitHub ↗

Get the wrapper message class for a wrapped type.

(proto_type: str)

Source from the content-addressed store, hash-verified

2008
2009
2010def _get_wrapper(proto_type: str) -> Type:
2011 """Get the wrapper message class for a wrapped type."""
2012
2013 # TODO: include ListValue and NullValue?
2014 return {
2015 TYPE_BOOL: BoolValue,
2016 TYPE_BYTES: BytesValue,
2017 TYPE_DOUBLE: DoubleValue,
2018 TYPE_FLOAT: FloatValue,
2019 TYPE_ENUM: EnumValue,
2020 TYPE_INT32: Int32Value,
2021 TYPE_INT64: Int64Value,
2022 TYPE_STRING: StringValue,
2023 TYPE_UINT32: UInt32Value,
2024 TYPE_UINT64: UInt64Value,
2025 }[proto_type]

Callers 3

_preprocess_singleFunction · 0.85
_len_preprocessed_singleFunction · 0.85
_postprocess_singleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected