MCPcopy Index your code
hub / github.com/python/mypy / default

Method default

mypy/meet.py:1161–1168  ·  view source on GitHub ↗
(self, typ: Type)

Source from the content-addressed store, hash-verified

1159 return meet_types(s, t)
1160
1161 def default(self, typ: Type) -> ProperType:
1162 if isinstance(typ, UnboundType):
1163 return AnyType(TypeOfAny.special_form)
1164 else:
1165 if state.strict_optional:
1166 return UninhabitedType()
1167 else:
1168 return NoneType()
1169
1170
1171def meet_similar_callables(t: CallableType, s: CallableType) -> CallableType:

Callers 10

visit_type_varMethod · 0.95
visit_param_specMethod · 0.95
visit_type_var_tupleMethod · 0.95
visit_parametersMethod · 0.95
visit_instanceMethod · 0.95
visit_callable_typeMethod · 0.95
visit_tuple_typeMethod · 0.95
visit_typeddict_typeMethod · 0.95
visit_literal_typeMethod · 0.95
visit_type_typeMethod · 0.95

Calls 4

AnyTypeClass · 0.90
UninhabitedTypeClass · 0.90
NoneTypeClass · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected