(item: Type, op_method: str)
| 1577 | |
| 1578 | |
| 1579 | def meta_has_operator(item: Type, op_method: str) -> bool: |
| 1580 | item = get_proper_type(item) |
| 1581 | if isinstance(item, AnyType): |
| 1582 | return True |
| 1583 | item = instance_fallback(item) |
| 1584 | meta = item.type.metaclass_type |
| 1585 | if meta is None: |
| 1586 | type_type = lookup_stdlib_typeinfo("builtins.type", modules_state.modules) |
| 1587 | meta = Instance(type_type, []) |
| 1588 | return meta.type.has_readable_member(op_method) |
| 1589 | |
| 1590 | |
| 1591 | def defined_in_superclass(info: TypeInfo, name: str) -> bool: |
no test coverage detected
searching dependent graphs…