(self, typ: Type)
| 754 | return None |
| 755 | |
| 756 | def should_self_match(self, typ: Type) -> bool: |
| 757 | typ = get_proper_type(typ) |
| 758 | if isinstance(typ, TupleType): |
| 759 | typ = typ.partial_fallback |
| 760 | if isinstance(typ, AnyType): |
| 761 | return False |
| 762 | if isinstance(typ, Instance) and typ.type.get("__match_args__") is not None: |
| 763 | # Named tuples and other subtypes of builtins that define __match_args__ |
| 764 | # should not self match. |
| 765 | return False |
| 766 | for other in self.self_match_types: |
| 767 | if is_subtype(typ, other): |
| 768 | return True |
| 769 | return False |
| 770 | |
| 771 | def can_match_sequence(self, typ: ProperType) -> bool: |
| 772 | if isinstance(typ, AnyType): |
no test coverage detected