is_union_type() — anthropic-sdk-python Function Reference
Architecture documentation for the is_union_type() function in _typing.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 447ec259_02e0_02ff_f348_bceda3f526e2["is_union_type()"] b104416a_b868_41fc_902c_7e2aaf93e2af["_typing.py"] 447ec259_02e0_02ff_f348_bceda3f526e2 -->|defined in| b104416a_b868_41fc_902c_7e2aaf93e2af 76cf4787_3c42_ee68_9967_3160c7a1aa0d["_transform_recursive()"] 76cf4787_3c42_ee68_9967_3160c7a1aa0d -->|calls| 447ec259_02e0_02ff_f348_bceda3f526e2 6db2b331_e127_3cb2_32c8_72a1730d0041["_async_transform_recursive()"] 6db2b331_e127_3cb2_32c8_72a1730d0041 -->|calls| 447ec259_02e0_02ff_f348_bceda3f526e2 17854057_420d_9158_b387_597d6c79873e["get_origin()"] 447ec259_02e0_02ff_f348_bceda3f526e2 -->|calls| 17854057_420d_9158_b387_597d6c79873e style 447ec259_02e0_02ff_f348_bceda3f526e2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/_utils/_typing.py lines 40–41
def is_union_type(typ: type) -> bool:
return _is_union(get_origin(typ))
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does is_union_type() do?
is_union_type() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/_utils/_typing.py.
Where is is_union_type() defined?
is_union_type() is defined in src/anthropic/_utils/_typing.py at line 40.
What does is_union_type() call?
is_union_type() calls 1 function(s): get_origin.
What calls is_union_type()?
is_union_type() is called by 2 function(s): _async_transform_recursive, _transform_recursive.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free