MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / field_get_default

Function field_get_default

src/anthropic/_compat.py:93–101  ·  view source on GitHub ↗
(field: FieldInfo)

Source from the content-addressed store, hash-verified

91
92
93def field_get_default(field: FieldInfo) -> Any:
94 value = field.get_default()
95 if PYDANTIC_V1:
96 return value
97 from pydantic_core import PydanticUndefined
98
99 if value == PydanticUndefined:
100 return None
101 return value
102
103
104def 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