| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/prompt_toolkit/completion/__pycache__/ |
Upload File : |
�
�Ïc} � �X � d dl mZmZ d dlmZ ddlmZmZmZ dgZ G d� de� � Z
dS )� )�Iterable�Set)�Document� )�
CompleteEvent� Completer�
Completion�DeduplicateCompleterc �B � e Zd ZdZdeddfd�Zdededee fd�Z
dS ) 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.
� completer�returnNc � � || _ d S �N)r )�selfr s �G/usr/lib/python3/dist-packages/prompt_toolkit/completion/deduplicate.py�__init__zDeduplicateCompleter.__init__ s
� �"����� �document�complete_eventc # �( K � t � � }| j � ||� � D ]e}|j d |j |j z � |j z |j |j d � z }||j k r�G||v r�L|� |� � |V � �fd S r )�setr �get_completions�text�cursor_position�start_position�add)r r r �found_so_far�
completion�text_if_applieds r r z$DeduplicateCompleter.get_completions s� � � � � "%�����.�8�8��>�R�R� � �J��
�T�� 8�:�;T� T�T�U��/�"��-�� 8� :� :�;�<�
� �(�-�/�/���,�.�.�����_�-�-�-������ � r )�__name__�
__module__�__qualname__�__doc__r r r r r r r � r r r
r
sq � � � � � �� �#�)� #�� #� #� #� #�� ��2?�� �*� �� � � � � r N)�typingr r �prompt_toolkit.documentr �baser r r �__all__r
r$ r r �<module>r) s� �� � � � � � � � � ,� ,� ,� ,� ,� ,� 6� 6� 6� 6� 6� 6� 6� 6� 6� 6�!�
"��!� !� !� !� !�9� !� !� !� !� !r