Skip to content

Commit f180c3f

Browse files
committed
fix: use tuple syntax for isinstance check (Python 3.9 compat)
1 parent 8a07c5e commit f180c3f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codeflash/languages/python/static_analysis/code_extractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def _has_aliased_future_imports(module: cst.Module) -> bool:
433433
if (
434434
isinstance(s, cst.ImportFrom)
435435
and s.module is not None
436-
and isinstance(s.module, cst.Attribute | cst.Name)
436+
and isinstance(s.module, (cst.Attribute, cst.Name))
437437
and hasattr(s.module, "value")
438438
and s.module.value == "__future__"
439439
and isinstance(s.names, (list, tuple))

0 commit comments

Comments
 (0)