diff --git a/tests/test_var.py b/tests/test_var.py index 1f73ebf5fa4..19143bcf45e 100644 --- a/tests/test_var.py +++ b/tests/test_var.py @@ -922,9 +922,9 @@ def test_function_var(): def test_var_operation(): @var_operation(output=NumberVar) def add(a: number_types, b: number_types) -> str: - if isinstance(b, int | float) and b == 0: + if isinstance(b, (int, float)) and b == 0: return str(a) - if isinstance(a, int | float) and a == 0: + if isinstance(a, (int, float)) and a == 0: return str(b) return f"({a} + {b})"