MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / field_get_default

Function field_get_default

src/opencode_ai/_compat.py:92–100  ·  view source on GitHub ↗
(field: FieldInfo)

Source from the content-addressed store, hash-verified

90
91
92def field_get_default(field: FieldInfo) -> Any:
93 value = field.get_default()
94 if PYDANTIC_V2:
95 from pydantic_core import PydanticUndefined
96
97 if value == PydanticUndefined:
98 return None
99 return value
100 return value
101
102
103def field_outer_type(field: FieldInfo) -> Any:

Callers 2

constructMethod · 0.85
_construct_fieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected