(
self,
text: str,
collection: Collection[Any],
start_only: bool,
)
| 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, |
no outgoing calls