Format: application/x-python-code
1 o
2
3 �h � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z e
4 � ZG dd� de�Zd d
5 � Z
6 dd� Zd
7 d� Zdd� Zdd� Zdd� Zddd�ZdS )ap
8 This module is here for string completions. This means mostly stuff where
9 strings are returned, like `foo = dict(bar=3); foo["ba` would complete to
10 `"bar"]`.
11
12 It however does the same for numbers. The difference between string completions
13 and other completions is mostly that this module doesn't return defined
14 names in a module, but pretty much an arbitrary string.
15 � N)�AbstractArbitraryName)�infer_call_of_leaf)�
16 Completion)�cut_value_at_positionc @ s e Zd ZdZdZdS )�
17 StringName�stringFN)�__name__�
18 __module__�__qualname__Zapi_typeZ
19 is_value_name� r r �Fc:\Users\shubh\Videos\agent\nova\Lib\site-packages\jedi/api/strings.pyr s r c C s� |}|dkr
20 |� � }d}|rt|||dd�}|dkrU|d u r'||ur't||�}| �|�}|� � } }
21 | dv r9| j} | jdv rUt||
22 �}tt| j ||d u rNdn|||d��S g S )N�[� T)�
23 invert_result)�)�]�})Zatom�trailer�name)�fuzzy)
24 Zget_previous_leaf�get_quote_endingr Zcreate_context�parent�typer �list�_completions_for_dicts�inference_state)Zmodule_context�
25 code_lines�leaf�positionr r Zbracket_leaf�
26 cut_end_quote�contextZbefore_nodeZbefore_bracket_leaf�valuesr r r �
27 complete_dict s.
28
29
30
31 �r"