Skip to content

Commit

Permalink
use is_equivalent for everything except TypeVar and ParamSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Apr 9, 2022
1 parent da5adc9 commit 272de9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/subtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def visit_instance(self, left: Instance) -> bool:
if not self.check_type_parameter(lefta, righta, COVARIANT):
nominal = False
else:
if not self.check_type_parameter(lefta, righta, COVARIANT):
if not is_equivalent(lefta, righta):
nominal = False
if nominal:
TypeState.record_subtype_cache_entry(self._subtype_kind, left, right)
Expand Down

0 comments on commit 272de9a

Please sign in to comment.