QueryCompletionListener.py imports controller, Selection, Context, settings, verbose and state but not Query, while
def on_query_completions(self, view, prefix, locations):
if settings.get("disable_autocompletion") and not Query.by_command():
return False
uses it (ruff F821). With disable_autocompletion enabled, every completion request raises NameError: name 'Query' is not defined instead of returning False.
Fix: import Query as the other modules do.
Found while testing packages from the Package Control catalog (static analysis with ruff plus source review).
QueryCompletionListener.pyimportscontroller,Selection,Context,settings,verboseandstatebut notQuery, whileuses it (ruff F821). With
disable_autocompletionenabled, every completion request raisesNameError: name 'Query' is not definedinstead of returningFalse.Fix: import
Queryas the other modules do.Found while testing packages from the Package Control catalog (static analysis with ruff plus source review).