| 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 : /lib/python3/dist-packages/jedi/api/__pycache__/ |
Upload File : |
�
p�{c � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z e
� � Z G d� de� � Zd � Z
d
� Zd� Zd� Zd
� Zd� Zdd�ZdS )ap
This module is here for string completions. This means mostly stuff where
strings are returned, like `foo = dict(bar=3); foo["ba` would complete to
`"bar"]`.
It however does the same for numbers. The difference between string completions
and other completions is mostly that this module doesn't return defined
names in a module, but pretty much an arbitrary string.
� N)�AbstractArbitraryName)�infer_call_of_leaf)�
Completion)�cut_value_at_positionc � � e Zd ZdZdZdS )�
StringName�stringFN)�__name__�
__module__�__qualname__�api_type�
is_value_name� � �2/usr/lib/python3/dist-packages/jedi/api/strings.pyr r s � � � � � ��H��M�M�Mr r c �| � |}|dk r|� � � }d}|rt |||d�� � }|dk r�|�||urt ||� � }| � |� � }|� � � } | j dv r:t || � � }
t
t | j |
|�dn|||�� � � � S g S )N�[� T)�
invert_result)�atom�trailer�name)�fuzzy) �get_previous_leaf�get_quote_endingr �create_context�typer �list�_completions_for_dicts�inference_state)�module_context�
code_lines�leaf�positionr r �bracket_leaf�
cut_end_quote�context�before_bracket_leaf�valuess r �
complete_dictr* s� � ��L��s����-�-�/�/���M�
� [�(���X�UY�Z�Z�Z�
��s����>�d�,�6�6�*�4��:�:�F� �/�/��=�=��*�<�<�>�>���#�'B�B�B�'��1D�E�E�F��.��.���n���&���� � � � �
� �Ir c # �. K � t t |� � d� �� � D ]r}t ||� � }|� |� � rKt | |d t |� � pd � � � }t
| |d t |� � |�� � V � �sd S )Nc � � t | � � S )N)�repr)�xs r �<lambda>z(_completions_for_dicts.<locals>.<lambda>5 s � �$�q�'�'� r )�key)�stack�like_name_length�is_fuzzy)�sorted�_get_python_keys�_create_repr_string�
startswithr �lenr )r �dicts�literal_stringr&