diff --git a/tests/test_completions.py b/tests/test_completions.py index 7654f84..f55b3b0 100644 --- a/tests/test_completions.py +++ b/tests/test_completions.py @@ -104,7 +104,7 @@ 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 @@ -112,3 +112,4 @@ def bar(): assert "nonpayable" in labels assert "view" in labels assert "pure" in labels + assert "deploy" in labels diff --git a/vyper_lsp/analyzer/AstAnalyzer.py b/vyper_lsp/analyzer/AstAnalyzer.py index a9dbbe5..5541632 100644 --- a/vyper_lsp/analyzer/AstAnalyzer.py +++ b/vyper_lsp/analyzer/AstAnalyzer.py @@ -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")