Skip to content

Commit

Permalink
add deploy decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
z80dev committed Aug 8, 2024
1 parent de9763e commit 8b0d2b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/test_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,12 @@ def bar():

analyzer = AstAnalyzer(ast)
completions = analyzer.get_completions_in_doc(doc, params)
assert len(completions.items) == 6
assert len(completions.items) == 7
labels = [c.label for c in completions.items]
assert "internal" in labels
assert "external" in labels
assert "payable" in labels
assert "nonpayable" in labels
assert "view" in labels
assert "pure" in labels
assert "deploy" in labels
2 changes: 1 addition & 1 deletion vyper_lsp/analyzer/AstAnalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

BASE_TYPES = list({"bool", "address"} | INTEGER_TYPES | BYTES_M_TYPES | DECIMAL_TYPES)

DECORATORS = ["payable", "nonpayable", "view", "pure", "external", "internal"]
DECORATORS = ["payable", "nonpayable", "view", "pure", "external", "internal", "deploy"]

logger = logging.getLogger("vyper-lsp")

Expand Down

0 comments on commit 8b0d2b9

Please sign in to comment.