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

Method _get_field_default

src/betterproto/__init__.py:1167–1171  ·  view source on GitHub ↗
(self, field_name: str)

Source from the content-addressed store, hash-verified

1165 return field_cls
1166
1167 def _get_field_default(self, field_name: str) -> Any:
1168 with warnings.catch_warnings():
1169 # ignore warnings when initialising deprecated field defaults
1170 warnings.filterwarnings("ignore", category=DeprecationWarning)
1171 return self._betterproto.default_gen[field_name]()
1172
1173 @classmethod
1174 def _get_field_default_gen(cls, field: dataclasses.Field) -> Any:

Callers 8

__eq__Method · 0.95
__getattribute__Method · 0.95
__bool__Method · 0.95
dumpMethod · 0.95
__len__Method · 0.95
loadMethod · 0.95
to_dictMethod · 0.95
to_pydictMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected