Skip to content

Commit

Permalink
fix hint for initializer w no references
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberthirst committed Apr 5, 2024
1 parent c79c159 commit ab1a2e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vyper/semantics/analysis/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def visit_InitializesDecl(self, node):

if rhs is None:
hint = f"try importing {item.alias} first"
elif isinstance(module_ref, vy_ast.NamedExpr):
elif not isinstance(module_ref.parent, vy_ast.Subscript):
hint = f"did you mean {module_ref.id}[{lhs} := {rhs}]?"
else:
hint = f"add `{lhs} := {rhs}` to its initializer list"
Expand Down

0 comments on commit ab1a2e3

Please sign in to comment.