From fbf0ed68a4c6324836c70172f451a63c0b95e24d Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Fri, 12 Sep 2025 07:33:14 -0700 Subject: [PATCH] Change Attr `__str__` to use repr() When the attribute is string, for example, we want to display `"attr"` instead of `attr`. Signed-off-by: Justin Chu --- src/onnx_ir/_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onnx_ir/_core.py b/src/onnx_ir/_core.py index f1a0e040..3305b99f 100644 --- a/src/onnx_ir/_core.py +++ b/src/onnx_ir/_core.py @@ -3484,7 +3484,7 @@ def __str__(self) -> str: return f"@{self.ref_attr_name}" if self.type == _enums.AttributeType.GRAPH: return textwrap.indent("\n" + str(self.value), " " * 4) - return str(self.value) + return repr(self.value) def __repr__(self) -> str: if self.is_ref():