From d885c02769c6b909051a2a4d20a37e10fab3a97f Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Thu, 2 Nov 2023 17:30:03 -0500 Subject: [PATCH] fix: extra space in repr --- src/ape/types/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ape/types/__init__.py b/src/ape/types/__init__.py index 131382e26b..11a061127e 100644 --- a/src/ape/types/__init__.py +++ b/src/ape/types/__init__.py @@ -314,7 +314,9 @@ def __str__(self) -> str: return f"{self.event_name}({self._event_args_str})" def __repr__(self) -> str: - return f"<{self.event_name} {self._event_args_str}>" + event_arg_str = self._event_args_str + suffix = f" {event_arg_str}" if event_arg_str else "" + return f"<{self.event_name}{suffix}>" def __ape_extra_attributes__(self) -> Iterator[ExtraModelAttributes]: yield ExtraModelAttributes(