Skip to content

Commit edee33f

Browse files
authored
Change Attr __str__ to use repr() (#190)
When the attribute is string, for example, we want to display `"attr"` instead of `attr`. Signed-off-by: Justin Chu <[email protected]>
1 parent 745f68a commit edee33f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/onnx_ir/_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3484,7 +3484,7 @@ def __str__(self) -> str:
34843484
return f"@{self.ref_attr_name}"
34853485
if self.type == _enums.AttributeType.GRAPH:
34863486
return textwrap.indent("\n" + str(self.value), " " * 4)
3487-
return str(self.value)
3487+
return repr(self.value)
34883488

34893489
def __repr__(self) -> str:
34903490
if self.is_ref():

0 commit comments

Comments
 (0)