Skip to content

Commit

Permalink
fix signature for get_type_from_annotation (#2805)
Browse files Browse the repository at this point in the history
in several places, the extra args (e.g. is_constant) are passed as
positional args instead of kwargs, resulting in a TypeError, instead of
raising the user-friendly exception. this commit adds `*args` to the
signature so that the TypeError is not raised.
  • Loading branch information
charles-cooper authored Apr 20, 2022
1 parent ff6ddce commit 37fd1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vyper/semantics/types/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def canonical_abi_type(self) -> str:
"""
return self.abi_type.selector_name()

def from_annotation(self, node: vy_ast.VyperNode, **kwargs: Any) -> None:
def from_annotation(self, node: vy_ast.VyperNode, *args: Any, **kwargs: Any) -> None:
# always raises, user should have used a primitive
raise StructureException("Value is not a type", node)

Expand Down

0 comments on commit 37fd1e0

Please sign in to comment.