Format: application/x-python-code
1 o
2
3 �h� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
4 Z
5 dd� Zd d
6 � Zdd� Z
7 d
8 d� Zeddd��ZG dd� de�ZdS )a
9
10 This module is responsible for inferring *args and **kwargs for signatures.
11
12 This means for example in this case::
13
14 def foo(a, b, c): ...
15
16 def bar(*args):
17 return foo(1, *args)
18
19 The signature here for bar should be `bar(b, c)` instead of bar(*args).
20 � )� Parameter)�tree)�to_list)�ParamNameWrapper)�is_big_annoying_libraryc c s � ddl m} ddlm} | j}t�| jdd�}|�� }|jd j }|jd j
21 }|�� �| j
22 �D ]Q}||j kr=|k r�n q0|j} | jdkr�| jd d| j kr�|| d �}
23 |
24 d ur�|�|
25 �}t| ||�r�t||
26 �}|j|j||
27 jd
28 |
29 d�}
30 |D ]}||
31 fV qyq0d S )Nr )�search_ancestor)�
32 TreeArgumentsZfuncdefZlambdef������argument�*�trailer� )�contextZ
33 argument_noder )Zparso.python.treer Zjedi.inference.argumentsr �parent_contextr Z tree_nameZ
34 get_root_node�children� start_pos�end_posZget_used_names�get�string_name�parent�type�
35 star_countZcreate_context�_goes_to_param_name�
36 _to_callablesZ
37 create_cachedZinference_state)�
38 param_namer r Zexecution_contextZ
39 function_nodeZmodule_node�start�end�namer
40 r r �values�args�c� r! �Nc:\Users\shubh\Videos\agent\nova\Lib\site-packages\jedi/inference/star_args.py�_iter_nodes_for_param s8 �
41
42
43
44 ���r# c s>