(typ: ProperType)
| 1564 | |
| 1565 | |
| 1566 | def instance_fallback(typ: ProperType) -> Instance: |
| 1567 | if isinstance(typ, Instance): |
| 1568 | return typ |
| 1569 | if isinstance(typ, TupleType): |
| 1570 | return tuple_fallback(typ) |
| 1571 | if isinstance(typ, (LiteralType, TypedDictType)): |
| 1572 | return typ.fallback |
| 1573 | if instance_cache.object_type is None: |
| 1574 | object_typeinfo = lookup_stdlib_typeinfo("builtins.object", modules_state.modules) |
| 1575 | instance_cache.object_type = Instance(object_typeinfo, []) |
| 1576 | return instance_cache.object_type |
| 1577 | |
| 1578 | |
| 1579 | def meta_has_operator(item: Type, op_method: str) -> bool: |
no test coverage detected
searching dependent graphs…