Skip to content

Commit addb47d

Browse files
committed
syntax fix for isinstance
1 parent a394cd8 commit addb47d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/context/unused_definition_remover.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def collect_top_level_definitions(node: cst.CSTNode, definitions: dict[str, Usag
8888
for section in section_names:
8989
original_content = getattr(node, section, None)
9090
# If section contains a list of nodes
91-
if isinstance(original_content, list | tuple):
91+
if isinstance(original_content, (list, tuple)):
9292
for child in original_content:
9393
collect_top_level_definitions(child, definitions)
9494
# If section contains a single node
@@ -411,7 +411,7 @@ def remove_unused_definitions_recursively(
411411

412412
for section in section_names:
413413
original_content = getattr(node, section, None)
414-
if isinstance(original_content, list | tuple):
414+
if isinstance(original_content, (list, tuple)):
415415
new_children = []
416416
section_found_used = False
417417

0 commit comments

Comments
 (0)