MCPcopy Index your code
hub / github.com/nonebot/nonebot2 / origin_is_union

Function origin_is_union

nonebot/typing.py:50–51  ·  view source on GitHub ↗
(origin: type[t.Any] | None)

Source from the content-addressed store, hash-verified

48
49
50def origin_is_union(origin: type[t.Any] | None) -> bool:
51 return origin is t.Union or origin is types.UnionType
52
53
54def origin_is_literal(origin: type[t.Any] | None) -> bool:

Callers 3

_field_is_complexMethod · 0.90
_next_fieldMethod · 0.90
generic_check_issubclassFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected