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(
290290 # ErasedType as we do for non-proper subtyping.
291291 return True
292292
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-
296293 if isinstance (right , UnionType ) and not isinstance (left , UnionType ):
297294 # Normally, when 'left' is not itself a union, the only way
298295 # 'left' can be a subtype of the union 'right' is if it is a
@@ -621,8 +618,9 @@ def check_mixed(
621618 if call :
622619 return self ._is_subtype (call , right )
623620 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
626624
627625 def visit_type_var (self , left : TypeVarType ) -> bool :
628626 right = self .right
You can’t perform that action at this time.
0 commit comments