Commit 6eb2ea0 1 parent 78689b3 commit 6eb2ea0 Copy full SHA for 6eb2ea0
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,14 @@ def __post_init__(self) -> None:
51
51
if self .type not in VALID_VYPER_TYPES :
52
52
logger .warning (f"{ self } is not a valid Vyper type" )
53
53
54
+ Type = Union [str , Tuple , DynArray ]
54
55
55
56
@dataclass
56
57
class Parameter :
57
58
"""Function parameter representation."""
58
59
59
60
name : str
60
- type : str
61
+ type : Type
61
62
62
63
def __post_init__ (self ) -> None :
63
64
if self .type .startswith ("DynArray" ):
@@ -67,7 +68,7 @@ def __post_init__(self) -> None:
67
68
self .type = DynArray (type , int (max_length ))
68
69
except ValueError :
69
70
# TODO: include type and value info
70
- constant = Constant (name = max_length .strip (), type = None , value = None )
71
+ constant = Constant (name = max_length .strip (), type = None , value = None ) # type: ignore [arg-type]
71
72
self .type = DynArray (type , constant )
72
73
elif self .type not in VALID_VYPER_TYPES :
73
74
logger .warning (f"{ self } is not a valid Vyper type" )
@@ -87,7 +88,7 @@ class Function:
87
88
88
89
name : str
89
90
params : List [Parameter ]
90
- return_type : Optional [str ]
91
+ return_type : Optional [Type ]
91
92
docstring : Optional [str ]
92
93
93
94
def __post_init__ (self ) -> None :
You can’t perform that action at this time.
0 commit comments