MCPcopy Create free account
hub / github.com/dbcli/mycli / collect_matches

Function collect_matches

test/pytests/test_sqlcompleter.py:13–32  ·  view source on GitHub ↗
(
    orig_text: str,
    collection: list[str],
    *,
    start_only: bool = False,
    fuzzy: bool = True,
    casing: str | None = None,
    text_before_cursor: str = '',
)

Source from the content-addressed store, hash-verified

11
12
13def collect_matches(
14 orig_text: str,
15 collection: list[str],
16 *,
17 start_only: bool = False,
18 fuzzy: bool = True,
19 casing: str | None = None,
20 text_before_cursor: str = '',
21) -> list[tuple[str, int]]:
22 completer = SQLCompleter()
23 return list(
24 completer.find_matches(
25 orig_text,
26 collection,
27 start_only=start_only,
28 fuzzy=fuzzy,
29 casing=casing,
30 text_before_cursor=text_before_cursor,
31 )
32 )
33
34
35def make_completer(**kwargs) -> SQLCompleter:

Calls 2

find_matchesMethod · 0.95
SQLCompleterClass · 0.90

Tested by

no test coverage detected