Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
259
if
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
field_singleton_sub_fields_schema
Function · 0.90
go
Function · 0.90
get_discriminator_alias_and_values
Function · 0.90
_type_analysis
Method · 0.90
_validate_singleton
Method · 0.90
field_is_complex
Method · 0.90
__new__
Method · 0.90
display_as_type
Function · 0.85
get_sub_types
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected