Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Internal
* Move special commands out of `main.py`.
* Modernize orthography of prompt_toolkit filters.
* Pin all GitHub Actions to hashes.
* Remove unused method `get_completions()`.


1.67.1 (2026/03/28)
Expand Down
6 changes: 0 additions & 6 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
from configobj import ConfigObj
import keyring
from prompt_toolkit import print_formatted_text
from prompt_toolkit.completion import Completion
from prompt_toolkit.document import Document
from prompt_toolkit.formatted_text import (
ANSI,
HTML,
Expand Down Expand Up @@ -1033,10 +1031,6 @@ def _on_completions_refreshed(self, new_completer: SQLCompleter) -> None:
# "Refreshing completions..." indicator
self.prompt_session.app.invalidate()

def get_completions(self, text: str, cursor_position: int) -> Iterable[Completion]:
with self._completer_lock:
return self.completer.get_completions(Document(text=text, cursor_position=cursor_position), None)

def run_query(
self,
query: str,
Expand Down
9 changes: 0 additions & 9 deletions test/pytests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2236,15 +2236,6 @@ def test_on_completions_refreshed_updates_completer_and_invalidates_prompt() ->
assert entered_lock['count'] == 1


def test_get_completions_uses_current_completer() -> None:
cli = make_bare_mycli()
entered_lock = {'count': 0}
cli._completer_lock = cast(Any, ReusableLock(lambda: entered_lock.__setitem__('count', entered_lock['count'] + 1)))
cli.completer = cast(Any, SimpleNamespace(get_completions=lambda document, event: ['done']))
assert list(main.MyCli.get_completions(cli, 'select', 6)) == ['done']
assert entered_lock['count'] == 1


def test_click_entrypoint_callback_covers_dsn_list_init_commands(monkeypatch: pytest.MonkeyPatch) -> None:
dummy_class = make_dummy_mycli_class(
config={
Expand Down
Loading