Skip to content

Commit

Permalink
fix(engine): Correct expression reprs
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt committed Jun 6, 2024
1 parent 1372309 commit bc3dba0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tracecat/templates/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __str__(self) -> str:

def __repr__(self) -> str:
return (
"Templatedexpression("
"Expression("
f"template={self._template},"
f" expression={self._expr},"
f" typename={self._resolve_typename},"
Expand Down Expand Up @@ -195,6 +195,12 @@ def __init__(
raise ValueError(f"Invalid template expression: {template!r}")
self.expr = Expression(expr, operand=operand)

def __str__(self) -> str:
return self.__repr__()

def __repr__(self) -> str:
return f"TemplateExpression(expr={self.expr})"

def result(self) -> Any:
return self.expr.result()

Expand Down

0 comments on commit bc3dba0

Please sign in to comment.