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/value/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p�{cg��>�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZddlmZe��Zd	�Zee�
��ejd�����Zd�ZGd
�de	��ZGd�de
��ZGd�de��ZGd�de��ZdS)a�
A module to deal with stuff like `list.append` and `set.add`.

Array modifications
*******************

If the content of an array (``set``/``list``) is requested somewhere, the
current module will be checked for appearances of ``arr.append``,
``arr.insert``, etc.  If the ``arr`` name points to an actual array, the
content will be added

This can be really cpu intensive, as you can imagine. Because |jedi| has to
follow **every** ``append`` and check whether it's the right array. However this
works pretty good, because in *slow* cases, the recursion detector and other
settings will stop this process.

It is important to note that:

1. Array modifications work only in the current module.
2. Jedi only checks Array additions; ``list.pop``, etc are ignored.
�)�debug)�settings)�	recursion)�ValueSet�	NO_VALUES�HelperValueMixin�ValueWrapper)�LazyKnownValues)�infer_call_of_leaf)�inference_state_method_cachec�B�|jdvrtSt||��S)zI Just a mapper function for the internal _internal_check_array_additions )�list�set)�
array_typer�_internal_check_array_additions)�context�sequences  �E/usr/lib/python3/dist-packages/jedi/inference/value/dynamic_arrays.py�check_array_additionsr"s&����/�1�1���*�7�H�=�=�=�)�defaultc	�h��ddlm�tjd|zd���|���}t
jr|���rtjdd���tS�fd�}t
j	dc}t
_	|j
jd	k}|rgd
�nddg}t��}|D�]S}	|j
���|}	|	D�]}
|j
}|j|
jcxkr|jksn�)|
j}|j}
|
j�|��}	|
j|d
z}|jdks"|jddks|jd
dkr��n#t*$rY��wxYw|�|
��}t/j|j|
��5}|r1t5||
d���}||vr||||jd
|��z}ddd��n#1swxYwY����D#t6$rY��QwxYw|t
_	tjd|d���|S)zr
    Checks if a `Array` has "add" (append, insert, extend) statements:

    >>> a = [""]
    >>> a.append(1)
    r��	argumentszDynamic array search for %s�MAGENTA)�colorzDynamic array search aborted.c�~��t��|j||�������}t	��}|dvr
|dd�}|dvr|D]\}}|�|���nB|dvr>|D];\}}|t	|��������z}�<|S)N)�insert�)�append�addr)�extend�update)r�
TreeArguments�inference_state�unpackrr!�infer�iterate)r�arglist�add_name�params�result�key�
lazy_valuers       �r�find_additionsz7_internal_check_array_additions.<locals>.find_additions<s�����i�-�-�g�.E�w�PW�X�X�_�_�a�a�b�b�������z�!�!��A�B�B�Z�F��2�2�2�#)�
'�
'���Z��
�
�:�&�&�&�&�
'�
�-�
-�
-�#)�
<�
<���Z��#�j�.�.�0�0�8�8�:�:�;�;�;����
rFr)r r"rr!r#r�trailer�(�)T)�cut_own_trailerNzDynamic array result %s)�jedi.inferencerr�dbg�get_root_contextr�dynamic_array_additions�is_compiledr� dynamic_params_for_other_modules�name�string_namer�	tree_node�get_used_names�	start_pos�end_pos�parent�children�index�type�
IndexError�create_contextr�execution_allowedr%r�KeyError)rr�module_contextr/�temp_param_add�is_list�search_names�added_typesr*�possible_namesr:�
value_noder0�power�trailer_pos�execution_trailer�random_context�allowed�foundrs                   @rrr+s���)�(�(�(�(�(�	�I�+�h�6�i�H�H�H�H��-�-�/�/�N��+��~�/I�/I�/K�/K��
�	�1��C�C�C�C��������	�1�5�>�N�H�=��m�'�6�1�G�6=�T�2�2�2�2�E�8�CT�L��%�%�K� �&�&��%	�+�5�D�D�F�F�x�P�N�'� 
� 
��$�.�
�"�,�t�~�R�R�R�R�
�@R�R�R�R�R���+�����#�n�2�2�7�;�;��!�(-��{�Q��(G�%�)�-��:�:�0�9�!�<��C�C�0�9�!�<��C�C� � D��"�����H�����")�!7�!7��!=�!=���0��1H�%�P�P�
�T[��� 2�*� �,0�!�!�!��
$�u�,�,�'�>�>� .� 1� :�1� =� (�,�,��K�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��' 
���	�	�	��H�	����L1?�H�-�	�I�'��I�F�F�F�F��s6�>G>�1E0�0
E=�<E=�/4G/�/G3�6G3�>
H�Hc�v�t||��}ddlm}|�t	|g��g��S)z$Used for set() and list() instances.rr)�_DynamicArrayAdditionsr4r�ValuesArgumentsr)�instancer�ais   r�get_dynamic_array_instancerZ~sB��	��)�	4�	4�B�(�(�(�(�(�(��$�$�h��t�n�n�%5�6�6�6rc�.�eZdZdZd�Zd�Zdd�Zd	d�ZdS)
rVaj
    Used for the usage of set() and list().
    This is definitely a hack, but a good one :-)
    It makes it possible to use set/list conversions.

    This is not a proper context, because it doesn't have to be. It's not used
    in the wild, it's just used within typeshed as an argument to `__init__`
    for set/list and never used in any other place.
    c�"�||_||_dS�N)�	_instance�
_arguments)�selfrXrs   r�__init__z_DynamicArrayAdditions.__init__�s��!���#����rc�R�|jjj�d��\}|S)N�tuple)r^r%�builtins_module�py__getattribute__)r`�tuple_s  r�py__class__z"_DynamicArrayAdditions.py__class__�s%���.�0�@�S�S�T[�\�\����
rNc#�PK�|j}	t|�����\}}|������Ed{V��n#t
$rYnwxYwddlm}t||��r$t|j
|j��}|Ed{V��dSdS)Nr)r$)r_�nextr&r'r(�
StopIteration�jedi.inference.argumentsr$�
isinstancerrr^)r`�contextualized_noder�_r.r$�	additionss       r�
py__iter__z!_DynamicArrayAdditions.py__iter__�s������O�	�	4� ��!1�!1�!3�!3�4�4�M�A�z�"�'�'�)�)�1�1�3�3�3�3�3�3�3�3�3�3���	�	�	��D�	����
	;�:�:�:�:�:��i��/�/�	!�7�	�8I�4�>�Z�Z�I� � � � � � � � � � �	!�	!s�$A�
A)�(A)Fc�,�|�|��Sr])rp)r`rm�is_asyncs   rr(z_DynamicArrayAdditions.iterate�s�����2�3�3�3rr])NF)�__name__�
__module__�__qualname__�__doc__rargrpr(�rrrVrV�sd��������$�$�$����!�!�!�!�4�4�4�4�4�4rrVc�*��eZdZ�fd�Zd�Zd�Z�xZS)�
_Modificationc�f��t���|��||_||_dSr])�superra�_assigned_values�_contextualized_key)r`�
wrapped_value�assigned_values�contextualized_key�	__class__s    �rraz_Modification.__init__�s1���
������'�'�'� /���#5�� � � rc�6�|jj|i|��|jzSr])�_wrapped_value�
py__getitem__r|)r`�args�kwargss   rr�z_Modification.py__getitem__�s%��0�t�"�0�$�A�&�A�A�D�DY�Y�Yrc��d�|j���D��}||vr|jS|j�|��S)Nc�B�g|]}|�t����Srw)�get_safe_value�	_sentinel)�.0�vs  r�
<listcomp>z6_Modification.py__simple_getitem__.<locals>.<listcomp>�s6��
�
�
��
���Y�'�'�
�
�
r)r}r'r|r��py__simple_getitem__)r`rB�actuals   rr�z"_Modification.py__simple_getitem__�sZ��
�
��-�3�3�5�5�
�
�
���F�?�?��(�(��"�7�7��>�>�>r)rsrtrurar�r��
__classcell__)r�s@rryry�sY�������6�6�6�6�6�
Z�Z�Z�?�?�?�?�?�?�?rryc��eZdZdd�Zd�ZdS)�DictModificationNc#�\K�|j�|��Ed{V��|jV�dSr])r�rpr}�r`rms  rrpzDictModification.py__iter__�sE�����&�1�1�2E�F�F�F�F�F�F�F�F�F��&�&�&�&�&�&rc�h�|j���|j���zSr])r��get_key_valuesr}r')r`s rr�zDictModification.get_key_values�s+���"�1�1�3�3�d�6N�6T�6T�6V�6V�V�Vrr])rsrtrurpr�rwrrr�r��s<������'�'�'�'�W�W�W�W�Wrr�c��eZdZdd�ZdS)�ListModificationNc#�vK�|j�|��Ed{V��t|j��V�dSr])r�rpr
r|r�s  rrpzListModification.py__iter__�sM�����&�1�1�2E�F�F�F�F�F�F�F�F�F��d�3�4�4�4�4�4�4�4rr])rsrtrurprwrrr�r��s(������5�5�5�5�5�5rr�N)rv�jedirrr4r�jedi.inference.base_valuerrrr	�jedi.inference.lazy_valuer
�jedi.inference.helpersr�jedi.inference.cacher�objectr�r�increase_indentrrZrVryr�r�rwrr�<module>r�s�����*������������$�$�$�$�$�$�������������5�5�5�5�5�5�5�5�5�5�5�5�=�=�=�=�=�=��F�H�H�	�>�>�>���i�0�0�0���N�N���1�0�N�b7�7�7�!4�!4�!4�!4�!4�-�!4�!4�!4�H?�?�?�?�?�L�?�?�?�&W�W�W�W�W�}�W�W�W�5�5�5�5�5�}�5�5�5�5�5r

Youez - 2016 - github.com/yon3zu
LinuXploit