403Webshell
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/inference/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/jedi/inference/__pycache__/dynamic_params.cpython-311.pyc
�

p�{c���$�dZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZmZddlmZdd
lmZdZd�Zejed�����Zed���ed�����Zd�Zd�Zd�Z dS)a�
One of the really important features of |jedi| is to have an option to
understand code like this::

    def foo(bar):
        bar. # completion here
    foo(1)

There's no doubt wheter bar is an ``int`` or not, but if there's also a call
like ``foo('str')``, what would happen? Well, we'll just show both. Because
that's what a human would expect.

It works as follows:

- |Jedi| sees a param
- search for function calls named ``foo``
- execute these calls and check the input.
�)�settings)�debug)�get_parent_scope)�inference_state_method_cache)�
TreeArguments)�get_executed_param_names)�is_stdlib_path)�to_list)�instance)�ValueSet�	NO_VALUES)�#get_module_contexts_containing_name)�	recursion�c����fd�}|S)Nc�(��|j}tj||j��5}|rN|xjdz
c_	�||��|xjdzc_cddd��S#|xjdzc_wxYwt
cddd��S#1swxYwYdS)N�)�inference_stater�execution_allowed�	tree_node�dynamic_params_depthr
)�function_value�param_index�inf�allowed�funcs    ��?/usr/lib/python3/dist-packages/jedi/inference/dynamic_params.py�wrapperz"_avoid_recursions.<locals>.wrapper&s����,��
�
(��n�.F�
G�
G�
	�7��
2��(�(�A�-�(�(�2��4���<�<��,�,��1�,�,�
	�
	�
	�
	�
	�
	�
	�
	���,�,��1�,�,�,�,�,�,��
	�
	�
	�
	�
	�
	�
	�
	�
	�
	�
	�
	����
	�
	�
	�
	�
	�
	s(�B�A�B�A1�1	B�B�B�)rrs` r�_avoid_recursionsr %s#���������N�c�����j}tjstS�������}|�t
|��rtS|jdkrt|��}|�tSn|j	j
}tjd|d�������}t|||��}tj��fd�|D����}tjdd���|S)a:
    A dynamic search for param values. If you try to complete a type:

    >>> def func(foo):
    ...     foo
    >>> func(1)
    >>> func("")

    It is not known what the type ``foo`` without analysing the whole code. You
    have to look for all calls to ``func`` to find out what ``foo`` possibly
    is.
    N�lambdefzDynamic param search in %s.�MAGENTA)�colorc3�h�K�|],}t�|������V��-dS)N)r�infer)�.0�	argumentsrrs  ��r�	<genexpr>z'dynamic_param_lookup.<locals>.<genexpr>\sY����� � �
�	!��I�	
�	
�
�	��u�w�w� � � � � � r!zDynamic param result finished)rr�dynamic_paramsr
�get_root_context�
py__file__r	�type�_get_lambda_name�name�valuer�dbg�_search_function_argumentsr�	from_sets)rr�funcdef�path�string_name�module_context�arguments_list�valuess``      r�dynamic_param_lookupr;6s$�����&�G��"�����*�*�,�,�7�7�9�9�D���N�4�0�0��
���|�y� � �&�w�/�/��������l�(��	�I�+�[�	�J�J�J�J�#�4�4�6�6�N�/����U�U�N�
�
� � � � � �(�	 � � ���F�
�I�-�Y�?�?�?�?��Mr!N)�defaultc	#�K�|}|dkr(t|��}|jdkr|jj}|}d}d}|j}t
jrt||g|d���}n|g}|D]j}	t|	|��D]R\}
}|dz
}||j	ztkrdS|	�|
��}t||||
|��D]}
d	}|
V��	�S|rdS�kdS)
z(
    Returns a list of param names.
    �__init__�classdefFr�)�limit_reductionrNT)
rr.r0r1rr� dynamic_params_for_other_modulesr�_get_potential_nodesr�MAX_PARAM_SEARCHES�create_context�_check_name_for_execution)r8r5r7�compare_node�cls�found_arguments�ir�module_contexts�for_mod_contextr0�trailer�random_contextr)s              rr3r3fsL�����L��j� � ��w�'�'���8�z�!�!��(�.�K��L��O�	�A�$�4�O��0�+�=��n�-�{��
�
�
���*�*��*����1�/�;�O�O�
	 �
	 �M�D�'�
��F�A�
�?�7�7�:L�L�L�����,�;�;�D�A�A�N�6�#�^�\�4��R�R�
 �
 �	�"&�������
 ��	��F�F�	�%�r!c��|j}|jdkrGt|���d��}|dkr|jd}|jdkr|jSdS)N�	expr_stmt�=rr0)�parentr.�next�yield_operators�childrenr1)�node�stmt�first_operator�firsts    rr/r/�sb���;�D��y�K����d�2�2�4�4�d�;�;���S� � ��M�!�$�E��z�V�#�#��{�"��4r!c#��K�	|j���|}n#t$rYdSwxYw|D]4}|���}|j}|jdkr|dkr||fV��5dS)NrM�()r�get_used_names�KeyError�
get_next_leafrRr.)�module_value�func_string_name�namesr0�bracketrMs      rrCrC�s�������&�5�5�7�7�8H�I���������������� � ���$�$�&�&���.���<�9�$�$��C�����-�����	 � s�$�
2�2c	#�����K�ddlm}���fd�}���|��D�]9}|j}||kr||��V��t	|j|���r|jdkr�|j���}	t|	��dkr�l|	d���}
d�|
D��|gkr���	��}|�
||����}t||	dj��}
|
D]R\}�|j
|j
cxkr|jkr1n�$|�|��}t!�|||���Ed{V���S��;dS)Nr)�BaseFunctionExecutionContextc����jd}|dkrd}t��|���}ddlm}|jjdkr(t
j�|j||��}|||��S|�	��r||j|��}|S)Nr�)r)�InstanceArgumentsr?)
rUr�jedi.inference.value.instancergrr.r�TreeInstance�parent_context�is_bound_method)r1�arglist�argsrg�created_instance�contextrrMs     ���r�create_argsz._check_name_for_execution.<locals>.create_args�s�����"�1�%���c�>�>��G��_�g�w��H�H��C�C�C�C�C�C��?��:�-�-�'�4���$���	 � ��%�$�%5�t�<�<�<��$�$�&�&�
?�(�(����>�>���Kr!r5rc��g|]	}|j��
Sr)r)r(�vs  r�
<listcomp>z-_check_name_for_execution.<locals>.<listcomp>�s��,�,�,����,�,�,r!)�jedi.inference.value.functionrdr'r�
isinstancerjr.�get_param_names�lenr,�
as_contextrCr7�	start_pos�end_posrErF)rrorGr0rMrdrpr1�
value_node�param_namesr:r8�execution_context�potential_nodesrNs``  `          rrFrF�s��������J�J�J�J�J�J��������&!�&�&�w��5�5�����_�
��:�%�%��+�e�$�$�$�$�$�$�
��,�.J�
K�
K�	� �%��2�2� �.�>�>�@�@�K��;���1�$�$�� ��^�)�)�+�+�F�,�,�V�,�,�,���>�>�!(�!9�!9�!;�!;��$)�$4�$4�[�[��5G�5G�$H�$H�!�"6�~�{�ST�~�Ga�"b�"b��%4�	�	�M�D�'�!�+�d�n�Q�Q�Q�Q�z�?Q�Q�Q�Q�Q�Q�):�)I�)I�$�)O�)O��#<�+�*�(� �#�$�$����������+�r!)!�__doc__�jedirr�jedi.parser_utilsr�jedi.inference.cacher�jedi.inference.argumentsr�jedi.inference.paramr�jedi.inference.helpersr	�jedi.inference.utilsr
�jedi.inference.valuer�jedi.inference.base_valuerr
�jedi.inference.referencesr�jedi.inferencerrDr �increase_indentr;r3r/rCrFrr!r�<module>r�s�����&������������.�.�.�.�.�.�=�=�=�=�=�=�2�2�2�2�2�2�9�9�9�9�9�9�1�1�1�1�1�1�(�(�(�(�(�(�)�)�)�)�)�)�9�9�9�9�9�9�9�9�I�I�I�I�I�I�$�$�$�$�$�$������"���+�+�����+�\��d�+�+�+��+�+�	��,�+�+�\	�	�	�
 �
 �
 �1�1�1�1�1r!

Youez - 2016 - github.com/yon3zu
LinuXploit