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

Method word_parts_match

mycli/sqlcompleter.py:1261–1272  ·  view source on GitHub ↗
(
        self,
        text_parts: list[str],
        item_parts: list[str],
    )

Source from the content-addressed store, hash-verified

1259 return collection
1260
1261 def word_parts_match(
1262 self,
1263 text_parts: list[str],
1264 item_parts: list[str],
1265 ) -> bool:
1266 occurrences = 0
1267 for text_part in text_parts:
1268 for item_part in item_parts:
1269 if item_part.startswith(text_part):
1270 occurrences += 1
1271 break
1272 return occurrences >= len(text_parts)
1273
1274 def find_fuzzy_match(
1275 self,

Callers 2

find_fuzzy_matchMethod · 0.95
test_word_parts_matchFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_word_parts_matchFunction · 0.76