← Back
Editing: base.cpython-311.pyc
� �Ïc�? � � � d Z ddlmZmZ ddlmZmZmZmZm Z m Z ddlmZ ddl mZmZmZ ddlmZmZ ddlmZmZ g d�Z G d � d � � Z G d� d� � Z G d � de�� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z d%de e de defd�Z!ded e e de"fd!�Z#d"ee" de"fd#�Z$d$S )&� � )�ABCMeta�abstractmethod)�AsyncGenerator�Callable�Iterable�List�Optional�Sequence)�Document)�aclosing�generator_to_async_generator�get_event_loop)�FilterOrBool� to_filter)�AnyFormattedText�StyleAndTextTuples) � Completion� Completer�ThreadedCompleter�DummyCompleter�DynamicCompleter� CompleteEvent�ConditionalCompleter�merge_completers�get_common_complete_suffixc �� � e Zd ZdZ ddededee dee d ed eddfd�Zdefd �Z de defd�Zdefd�Z edefd�� � Zedefd�� � Zedefd�� � Zdedd fd�ZdS )r a :param text: The new string that will be inserted into the document. :param start_position: Position relative to the cursor_position where the new text will start. The text will be inserted between the start_position and the original cursor position. :param display: (optional string or formatted text) If the completion has to be displayed differently in the completion menu. :param display_meta: (Optional string or formatted text) Meta information about the completion, e.g. the path or source where it's coming from. This can also be a callable that returns a string. :param style: Style string. :param selected_style: Style string, used for a selected completion. This can override the `style` parameter. r N� �text�start_position�display�display_meta�style�selected_style�returnc � � ddl m} || _ || _ || _ |�|} ||� � | _ || _ || _ | j dk sJ �d S )Nr ��to_formatted_text)�prompt_toolkit.formatted_textr( r r � _display_metar! r# r$ )�selfr r r! r"