Skip to content

Commit 00b23e1

Browse files
committed
fix: improve string formatting in BasicValueType and TableType classes
1 parent 3319cae commit 00b23e1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python/cocoindex/typing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,11 @@ class BasicValueType:
589589

590590
def __str__(self) -> str:
591591
if self.kind == "Vector" and self.vector is not None:
592-
dimension_str = f", {self.vector.dimension}" if self.vector.dimension is not None else ""
592+
dimension_str = (
593+
f", {self.vector.dimension}"
594+
if self.vector.dimension is not None
595+
else ""
596+
)
593597
return f"Vector[{self.vector.element_type}{dimension_str}]"
594598
elif self.kind == "Union" and self.union is not None:
595599
types_str = " | ".join(str(t) for t in self.union.variants)
@@ -737,7 +741,7 @@ def __str__(self) -> str:
737741
table_kind = "LTable"
738742
else: # UTable
739743
table_kind = "Table"
740-
744+
741745
return f"{table_kind}({self.row})"
742746

743747
def __repr__(self) -> str:

0 commit comments

Comments
 (0)