Skip to content

Commit

Permalink
Address more pyright warnings
Browse files Browse the repository at this point in the history
The `window` argument was entirely ignored …
  • Loading branch information
FichteFoll committed Jan 28, 2024
1 parent 6b582d5 commit 2030660
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions plugins/syntax_dev/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
PACKAGE_NAME = __package__.split('.')[0]


def status(msg, console=False):
def status(msg, window=None, console=False):
msg = "[%s] %s" % (PACKAGE_NAME, msg)
sublime.status_message(msg)
(window or sublime).status_message(msg)
if console:
print(msg)

Expand Down Expand Up @@ -246,19 +246,25 @@ def match_selector(selector, offset=0):
return self._complete_scope(prefix, locations)

# Auto-completion for include values using the 'contexts' keys and for
if match_selector("meta.expect-context-list-or-content"
" | meta.context-list-or-content", -1):
if match_selector(
"meta.expect-context-list-or-content | meta.context-list-or-content",
-1,
):
return ((self._complete_keyword(prefix, locations) or [])
+ self._complete_context(prefix, locations))

# Auto-completion for include values using the 'contexts' keys
if match_selector("meta.expect-context-list | meta.expect-context"
" | meta.include | meta.context-list", -1):
if match_selector(
"meta.expect-context-list | meta.expect-context | meta.include | meta.context-list",
-1,
):
return self._complete_context(prefix, locations) or None

# Auto-completion for branch points with 'fail' key
if match_selector("meta.expect-branch-point-reference"
" | meta.branch-point-reference", -1):
if match_selector(
"meta.expect-branch-point-reference | meta.branch-point-reference",
-1,
):
return self._complete_branch_point()

# Auto-completion for variables in match patterns using 'variables' keys
Expand Down

0 comments on commit 2030660

Please sign in to comment.