MCPcopy
hub / github.com/pydantic/pydantic / is_union

Function is_union

pydantic/v1/typing.py:261–262  ·  view source on GitHub ↗
(tp: Optional[Type[Any]])

Source from the content-addressed store, hash-verified

259if sys.version_info < (3, 10):
260
261 def is_union(tp: Optional[Type[Any]]) -> bool:
262 return tp is Union
263
264 WithArgsTypes = (TypingGenericAlias,)
265

Callers 9

goFunction · 0.90
_type_analysisMethod · 0.90
_validate_singletonMethod · 0.90
field_is_complexMethod · 0.90
__new__Method · 0.90
display_as_typeFunction · 0.85
get_sub_typesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected