MCPcopy Index your code
hub / github.com/dbcli/mycli / find_perfect_matches

Method find_perfect_matches

mycli/sqlcompleter.py:1330–1342  ·  view source on GitHub ↗
(
        self,
        text: str,
        collection: Collection[Any],
        start_only: bool,
    )

Source from the content-addressed store, hash-verified

1328 return completions
1329
1330 def find_perfect_matches(
1331 self,
1332 text: str,
1333 collection: Collection[Any],
1334 start_only: bool,
1335 ) -> list[tuple[str, int]]:
1336 completions: list[tuple[str, int]] = []
1337 match_end_limit = len(text) if start_only else None
1338 for item in collection:
1339 match_point = item.lower().find(text, 0, match_end_limit)
1340 if match_point >= 0:
1341 completions.append((item, Fuzziness.PERFECT))
1342 return completions
1343
1344 def resolve_casing(
1345 self,

Callers 2

find_matchesMethod · 0.95

Calls

no outgoing calls

Tested by 1