Skip to content

Commit

Permalink
avoid nested f-strings in Col repr
Browse files Browse the repository at this point in the history
  • Loading branch information
finn-rudolph committed Oct 1, 2024
1 parent 1d056b9 commit b7f8274
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pydiverse/transform/tree/col_expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ def __init__(
super().__init__(dtype, ftype)

def __repr__(self) -> str:
return (
f"C.{self.name}{f" ({self.dtype()})" if self.dtype() is not None else ""}"
)
dtype_str = f" ({self.dtype()})" if self.dtype() is not None else ""
return f"C.{self.name}{dtype_str}"


class LiteralCol(ColExpr):
Expand Down

0 comments on commit b7f8274

Please sign in to comment.