)L iXddlmZddlmZddlmZddlmZmZm Z dgZ GddeZ y) ) annotations)Iterable)Document) CompleteEvent Completer CompletionDeduplicateCompleterc,eZdZdZddZ ddZy)r z Wrapper around a completer that removes duplicates. Only the first unique completions are kept. Completions are considered to be a duplicate if they result in the same document text when they would be applied. c||_yN) completer)selfrs k/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/prompt_toolkit/completion/deduplicate.py__init__zDeduplicateCompleter.__init__s "c#PKt}|jj||D]y}|jd|j|j z|jz|j|jdz}||jk(r`||vre|j ||{ywr )setrget_completionstextcursor_positionstart_positionadd)rdocumentcomplete_event found_so_far completiontext_if_applieds rrz$DeduplicateCompleter.get_completionss"% ..88>R J T 8 8:;T;T TU//"-- 8 8 :;<  (--/,.   _ -  sB$B&N)rrreturnNone)rrrrrzIterable[Completion])__name__ __module__ __qualname____doc__rrrrr r s)# 2? rN) __future__rtypingrprompt_toolkit.documentrbaserrr __all__r r%rrr+s(",66 ! "!9!r