MCPcopy Create free account
hub / github.com/python/mypy / real_union

Method real_union

mypy/checkexpr.py:3218–3220  ·  view source on GitHub ↗
(self, typ: Type)

Source from the content-addressed store, hash-verified

3216 return result
3217
3218 def real_union(self, typ: Type) -> bool:
3219 typ = get_proper_type(typ)
3220 return isinstance(typ, UnionType) and len(typ.relevant_items()) > 1
3221
3222 @contextmanager
3223 def type_overrides_set(

Callers 2

check_overload_callMethod · 0.95
union_overload_resultMethod · 0.95

Calls 4

get_proper_typeFunction · 0.90
isinstanceFunction · 0.85
lenFunction · 0.85
relevant_itemsMethod · 0.80

Tested by

no test coverage detected