Skip to content

Commit bcf28be

Browse files
committed
Attempt to fix max recursive depth for distr tuple
1 parent 0d329dd commit bcf28be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/subtypes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ def is_subtype(
207207
fb = left.fallback
208208
distributed.append(TupleType(list(combo), fallback=fb))
209209
simplified = make_simplified_union(distributed)
210+
if is_equivalent(simplified, right):
211+
return True
210212
return _is_subtype(simplified, right, subtype_context, proper_subtype=False)
211213
return _is_subtype(left, right, subtype_context, proper_subtype=False)
212214

0 commit comments

Comments
 (0)