diff --git a/syntaxes/pyright.sublime-syntax b/syntaxes/pyright.sublime-syntax index 007fd92..3a26bf8 100644 --- a/syntaxes/pyright.sublime-syntax +++ b/syntaxes/pyright.sublime-syntax @@ -13,11 +13,7 @@ file_extensions: contexts: main: - include: lsp-type - - include: class-definitions - - include: function-definitions - - include: assignment-statements - - include: qualified-name - - include: comments + - include: statements ###[ PYTHON TYPE ANNOTATIONS ]################################################ @@ -230,9 +226,3 @@ contexts: - meta_content_scope: meta.function.signature.python meta.type.python - include: lsp-type-function-return-type-end - include: type-hint-expressions - -###[ PROTOTYPES ]############################################################# - - eol-pop: - - match: $ - pop: 1 diff --git a/syntaxes/syntax_test.pyright-syntax-test b/syntaxes/syntax_test.pyright-syntax-test index d50724a..55a2586 100644 --- a/syntaxes/syntax_test.pyright-syntax-test +++ b/syntaxes/syntax_test.pyright-syntax-test @@ -170,11 +170,9 @@ class ClassName(foo: int, /, *args: Any, **kwargs: Any) # ^^^ support.type.python # ^^ punctuation.section.brackets.end.python -# ```py -# import os, tempfile -# if os.name != "nt": -# f = tempfile.NamedTemporaryFile("w") -# ``` +import os, tempfile +if os.name != "nt": + f = tempfile.NamedTemporaryFile("w") # The following case comes the above code when running under Windows and hover on "NamedTemporaryFile". # Notice that it has no leading type information, e.g., "(variable)". NamedTemporaryFile: Overload[() -> None, () -> None, (mode: Literal['r', 'w'] = ..., size: int = ...) -> None]