@@ -285,17 +285,17 @@ def is_same_type(
285
285
286
286
287
287
# This is a helper function used to check for recursive type of distributed tuple
288
- def structurally_recursive (typ : Type , seen : set [Type ] | None = None ) -> bool :
288
+ def is_structurally_recursive (typ : Type , seen : set [Type ] | None = None ) -> bool :
289
289
if seen is None :
290
290
seen = set ()
291
291
typ = get_proper_type (typ )
292
292
if typ in seen :
293
293
return True
294
294
seen .add (typ )
295
295
if isinstance (typ , UnionType ):
296
- return any (structurally_recursive (item , seen .copy ()) for item in typ .items )
296
+ return any (is_structurally_recursive (item , seen .copy ()) for item in typ .items )
297
297
if isinstance (typ , TupleType ):
298
- return any (structurally_recursive (item , seen .copy ()) for item in typ .items )
298
+ return any (is_structurally_recursive (item , seen .copy ()) for item in typ .items )
299
299
return False
300
300
301
301
@@ -323,7 +323,7 @@ def _is_subtype(
323
323
if isinstance (left , TupleType ) and isinstance (right , UnionType ):
324
324
# check only if not recursive type because if recursive type,
325
325
# test run into maximum recursive depth reached
326
- if not structurally_recursive (left ) and not structurally_recursive (right ):
326
+ if not is_structurally_recursive (left ) and not is_structurally_recursive (right ):
327
327
fallback = left .partial_fallback
328
328
tuple_items = left .items
329
329
if hasattr (left , "fallback" ) and left .fallback is not None :
0 commit comments