Skip to content

Commit

Permalink
Fix compile error on old Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
genzgd committed Dec 21, 2024
1 parent b789a75 commit 59fd528
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clickhouse_connect/datatypes/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ def __init__(self, type_def: TypeDef):
self.element_names = type_def.keys
self.element_types = [get_from_name(name) for name in type_def.values]
if self.element_names:
self._name_suffix = f"({', '.join(quote_identifier(k) + ' ' + str(v) for
k, v in zip(type_def.keys, type_def.values))})"
self._name_suffix = f"({', '.join(quote_identifier(k) + ' ' + str(v) for k, v in zip(type_def.keys, type_def.values))})"
else:
self._name_suffix = type_def.arg_str
if self.element_names:
self._insert_name = f"Tuple({', '.join(quote_identifier(k) + ' ' + v.insert_name
for k, v in zip(type_def.keys, self.element_types))})"
self._insert_name = \
f"Tuple({', '.join(quote_identifier(k) + ' ' + v.insert_name for k, v in zip(type_def.keys, self.element_types))})"
else:
self._insert_name = f"Tuple({', '.join(v.insert_name for v in self.element_types)})"

Expand Down

0 comments on commit 59fd528

Please sign in to comment.