Skip to content

Commit f909d6e

Browse files
fix[tool]: update InterfaceT.__str__ implementation (#4205)
this doesn't affect anything in vyper codebase, but affects the serialization of interface types for tooling (including titanoboa)
1 parent cefb0c5 commit f909d6e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/functional/syntax/test_external_calls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def bar():
305305
extcall Foo(msg.sender)
306306
""",
307307
StructureException,
308-
"Function `type(interface Foo)` cannot be called without assigning the result",
308+
"Function `type(Foo)` cannot be called without assigning the result",
309309
None,
310310
),
311311
]

vyper/semantics/types/module.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ def getter_signature(self):
7676
def abi_type(self) -> ABIType:
7777
return ABI_Address()
7878

79+
def __str__(self):
80+
return self._id
81+
7982
def __repr__(self):
8083
return f"interface {self._id}"
8184

0 commit comments

Comments
 (0)