(infos: Iterable[EqualityValueInfo])
| 9856 | |
| 9857 | |
| 9858 | def combine_equality_value_info(infos: Iterable[EqualityValueInfo]) -> EqualityValueInfo: |
| 9859 | domains: dict[str, EqualityDomainInfo] = {} |
| 9860 | is_top = False |
| 9861 | for info in infos: |
| 9862 | for domain, domain_info in info.domains.items(): |
| 9863 | existing_domain_info = domains.get(domain) |
| 9864 | if existing_domain_info is None: |
| 9865 | domains[domain] = EqualityDomainInfo( |
| 9866 | set(domain_info.type_names), set(domain_info.enum_type_names) |
| 9867 | ) |
| 9868 | else: |
| 9869 | existing_domain_info.type_names.update(domain_info.type_names) |
| 9870 | existing_domain_info.enum_type_names.update(domain_info.enum_type_names) |
| 9871 | is_top = is_top or info.is_top |
| 9872 | return EqualityValueInfo(domains, is_top) |
| 9873 | |
| 9874 | |
| 9875 | def is_typeddict_type_context(lvalue_type: Type) -> bool: |
no test coverage detected
searching dependent graphs…