Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion aerospike_helpers/expressions/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Resources used by all expressions.
"""
from __future__ import annotations

# from __future__ import annotations
from itertools import chain
Expand Down Expand Up @@ -266,7 +267,12 @@ def __mod__(self, right: "TypeAny"):
def _create_operator_expression(left_children: "TypeChildren", right_children: "TypeChildren", op_type: int):
new_expr = _BaseExpr()
new_expr._op = op_type
new_expr._children = (*left_children, *right_children)
# Ensure both are tuples (handles generators and lists) before concatenation
if not isinstance(left_children, tuple):
left_children = tuple(left_children)
if not isinstance(right_children, tuple):
right_children = tuple(right_children)
new_expr._children = left_children + right_children
return new_expr


Expand Down
Loading