@@ -285,17 +285,17 @@ def is_same_type(
285285
286286
287287# 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 :
289289 if seen is None :
290290 seen = set ()
291291 typ = get_proper_type (typ )
292292 if typ in seen :
293293 return True
294294 seen .add (typ )
295295 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 )
297297 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 )
299299 return False
300300
301301
@@ -323,7 +323,7 @@ def _is_subtype(
323323 if isinstance (left , TupleType ) and isinstance (right , UnionType ):
324324 # check only if not recursive type because if recursive type,
325325 # 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 ):
327327 fallback = left .partial_fallback
328328 tuple_items = left .items
329329 if hasattr (left , "fallback" ) and left .fallback is not None :
0 commit comments