File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -290,9 +290,6 @@ def _is_subtype(
290
290
# ErasedType as we do for non-proper subtyping.
291
291
return True
292
292
293
- if not proper_subtype and isinstance (right , TypeVarType ) and right .has_default ():
294
- return left .accept (SubtypeVisitor (right .default , subtype_context , proper_subtype ))
295
-
296
293
if isinstance (right , UnionType ) and not isinstance (left , UnionType ):
297
294
# Normally, when 'left' is not itself a union, the only way
298
295
# 'left' can be a subtype of the union 'right' is if it is a
@@ -621,8 +618,9 @@ def check_mixed(
621
618
if call :
622
619
return self ._is_subtype (call , right )
623
620
return False
624
- else :
625
- return False
621
+ if isinstance (right , TypeVarType ) and right .has_default ():
622
+ return self ._is_subtype (left , right .default )
623
+ return False
626
624
627
625
def visit_type_var (self , left : TypeVarType ) -> bool :
628
626
right = self .right
You can’t perform that action at this time.
0 commit comments