Skip to content

Commit 272de9a

Browse files
committed
use is_equivalent for everything except TypeVar and ParamSpec
1 parent da5adc9 commit 272de9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/subtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def visit_instance(self, left: Instance) -> bool:
294294
if not self.check_type_parameter(lefta, righta, COVARIANT):
295295
nominal = False
296296
else:
297-
if not self.check_type_parameter(lefta, righta, COVARIANT):
297+
if not is_equivalent(lefta, righta):
298298
nominal = False
299299
if nominal:
300300
TypeState.record_subtype_cache_entry(self._subtype_kind, left, right)

0 commit comments

Comments
 (0)