403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
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 :  /lib/python3/dist-packages/jedi/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

Še�*�� �ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
hd�Zd	Zd d
�Zd�Zd�Zd
�Zd�Zd�Zd�Z		d!d�Zd�Zd�Zd�Zd�Zd d�Zee�Zd�Zd�Zd�Z d�Z!d�Z"e"d�Z#e"d�Z$e"dd�Z%y)"�N)�literal_eval)�cleandoc��WeakKeyDictionary)�tree)�parser_cache)�split_lines>�atom�expr�term�test�power�factor�funcdef�or_test�and_expr�and_test�classdef�not_test�xor_expr�	atom_expr�
arith_expr�
comparison�
shift_expr�import_from�import_name)	�try�except�finally�else�if�elif�with�for�whilec�N�g}|j}|dk(rE|j�}|dur/|jjdk7r|dk7r|j|�|S|dk(r4|j|�|jD]}|t|d��z
}�|S|dk(r6|jd	d
k(r"|jd}|dk7r|t|�z
}|S	|j}|jtvr|s|j|�|D]}|t||�z
}�|S#t$rY|SwxYw)
z
    For static analysis.
    �nameF�param�=�	expr_stmtT)�
last_added�	decorator����)����()�type�
get_next_leaf�parent�append�children�get_executable_nodes�_EXECUTE_NODES�AttributeError)�noder+�result�typ�	next_leaf�childr5s       �3/usr/lib/python3/dist-packages/jedi/parser_utils.pyr6r6sX���F�
�)�)�C�
�f�}��&�&�(�	����4�;�;�#3�#3�w�#>�9�PS�CS��M�M�$��2�M�1

��	�	�
�
�d���]�]�	C�E��*�5�T�B�B�F�	C�(�M�%

��	��=�=����#��=�=��$�D��s�{��.�t�4�4���M�		B��}�}�H��y�y�N�*�:��
�
�d�#�!�
B���.�u�j�A�A��
B��M���	���M�	�s�D�	D$�#D$c#��K�|��|jd}	|jdk(r|jd��n$|jdk(r|��n|jdk(sy|jd}�U�w)N����comp_for��
sync_comp_for�comp_if�r5r1)rA�lasts  r>�get_sync_comp_forsrG:sl����
�N����R� �D�
��9�9�
�"��-�-��"�"�
�Y�Y�/�
)��J����i�'���}�}�R� ���s�A*A,c�:�|jdjdk(S)z�
    Returns True if only one name is returned: ``for x in y``.
    Returns False if the for loop is more complicated: ``for x, z in y``.

    :returns: bool
    rBr'rE)�for_stmts r>�for_stmt_defines_one_namerJGs �����Q��$�$��.�.�c�"�|j}|j|cxkr|jkstd��td��d}t|j�D]3\}}||jkr|cS|j�}|tvs�2|}�5y)Nz!The node is not part of the flow.)�	start_pos�end_pos�
ValueError�	enumerater5�get_first_leaf�_FLOW_KEYWORDS)�	flow_noder9rM�keyword�ir=�
first_leafs       r>�get_flow_branch_keywordrWQs������I����)�@�y�/@�/@�@��<�=�=�
A��<�=�=��G��i�0�0�1�!���5��u���&��N��)�)�+�
���'� �G�!�rKc�d�|j�}|�tt|j��Sy)z3 Returns a cleaned version of the docstring token. �)�get_doc_noder�safe_literal_eval�value)�
scope_noder9s  r>�clean_scope_docstringr^`s0���"�"�$�D���
�)�$�*�*�5�6�6�
rKc���|jdk(ri|j}|j�}|�K|jdk(r<|jd}|jdk(rt	t|j��Sy)Nr*�simple_stmtr�stringrY)r1r3�get_next_siblingr5rr[r\)�	tree_node�maybe_strings  r>�find_statement_documentationrelss���~�~��$��$�$�	� �1�1�3���#�� � �M�1�+�4�4�Q�7���$�$��0�#�$5�l�6H�6H�$I�J�J�
rKc�X�|ddj�}|ddk(s|dvryt|�S)N�r�f)�fr�rfrY)�lowerr)r\�	first_twos  r>r[r[xs7���b�q�	���!�I���|�s��i�<�7�����rKc��|�(|jdk(rd}n|jj}|j�}|r|dd}ddj	d�|D��j�zdz}t
jd	d
|�}|jr |sd|jj�z}nd}||z|z}dj	tj||��S)
z�
    Generate a string signature of a function.

    :param width: Fold lines if a line is longer than this value.
    :type width: int
    :arg func_name: Override function name when given.
    :type func_name: str

    :rtype: str
    N�lambdefz<lambda>rBr0rYc3�<K�|]}|j����y�w�N)�get_code)�.0r(s  r>�	<genexpr>z get_signature.<locals>.<genexpr>�s����;�5�e�n�n�&�;�s�r.z\s+� z ->�
)r1r'r\�
get_params�join�strip�re�sub�
annotationrq�textwrap�wrap)	r�width�call_string�omit_first_param�omit_return_annotation�params�p�rtype�codes	         r>�
get_signaturer��s������<�<�9�$�$�K�!�,�,�,�,�K�
�
�
�
!�F��������b�g�g�;�F�;�;�A�A�C�C�c�I�A�
���v�s�A��A����"8���*�*�3�3�5�5������?�U�"�D��9�9�X�]�]�4��/�0�0rKc��	|j}|D]}t||��y#t$r|xj|z
c_YywxYw)z$
    Move the `Node` start_pos.
    N)r5�mover8�line)r9�line_offsetr5�cs    r>r�r��sJ��!��=�=���	!�A���K� �	!���!��	�	�[� �	�!�s�"�A�Ac��	|jdk(r(|jdj�j}n�|jdk(r(|jdj�j}nm|jdk(r6|jdj�j	�j}n(|j�j	�j}d|vry||jd�d}d	|vr|d|jd	�}d
|vr|d|jd
�}|S#t$rYyt$rYywxYw)zl
    returns (as string) any comment that appears on the same line,
    after the node, including the #
    rI��	with_stmt�r�N�#�
ru)	r1r5rQ�prefixr2�
get_last_leafr8rO�index)r9�
whitespace�comments   r>�get_following_comment_same_liner��s-��
��9�9�
�"����q�)�8�8�:�A�A�J�
�Y�Y�+�
%����q�)�8�8�:�A�A�J�
�Y�Y�)�
#����q�)�8�8�:�H�H�J�Q�Q�J��+�+�-�;�;�=�D�D�J��*�����)�)�#�.�/�0�G��w���.�7�=�=��.�/���w���.�7�=�=��.�/���N���������s�CD(�(	D>�3D>�=D>c�d�|j}|dk(r|jdjdk7S|dvS)NrArBrC)�
file_inputrrrnrC)r1r5)r9�ts  r>�is_scoper��s8���	�	�A��J���}�}�Q��$�$��7�7��Q�Q�QrKc�,���t��d��fd�	}|S)Nc���|�	�||�S	�|}	||S#t$r
ix}�|<Y�wxYw#t$r�||�x}||<|cYSwxYwrp)�KeyError)�parso_cache_noder9�
include_flows�
for_moduler:�cache�funcs     ��r>�wrapperz(_get_parent_scope_cache.<locals>.wrapper�s�����#���m�,�,�	6��/�0�J�	��d�#�#��	�	6�35�5�J��/�0�	6��
�	�(,�T�=�(A�A�F�Z��%��M�	�s��/�,�,�A�
A�Fr)r�r�r�s` @r>�_get_parent_scope_cacher��s�����E�
��NrKc����j}|�y	t|�r�|jdvr�|jj	d�}|j|j
�j
k\rz�jjdk(r�jj�k(r	|S�jjdk(r�jjd�k(r	|S|j}��|S|rMt|tj�r3|jdk(r"t�fd�|j�D��s|S|j}��3)	z'
    Returns the underlying scope.
    N)rrrn�:r(�tfpdefr�if_stmtc3�z�K�|]2}|j�jcxkxr|jknc���4y�wrp)rMrN)rr�nr9s  �r>rsz#get_parent_scope.<locals>.<genexpr>s2�����=� !��K�K�4�>�>�E�A�I�I�E�E�=�s�8;)r3r�r1r5r�rMr'�
isinstancer�Flow�any�get_test_nodes)r9r��scoper�s`   r>�get_parent_scoper��s ���
�K�K�E��}��
��E�?��z�z�?�?����,�,�S�1���>�>�%�(�2�2�d�n�n�D��{�{�'�'�7�2�t�{�{�7G�7G�4�7O���L����)�)�X�5�$�+�+�:N�:N�q�:Q�UY�:Y���L�!&���� ��L�
�z�%����;��J�J�)�+��=�%*�%9�%9�%;�=�=�������+rKc�.�t||�jS)z�
    Basically access the cached code lines in parso. This is not the nicest way
    to do this, but we avoid splitting all the lines again.
    )�get_parso_cache_node�lines��grammar�paths  r>�get_cached_code_linesr�s��
 ���.�4�4�4rKc�.�t|j|S)z�
    This is of course not public. But as long as I control parso, this
    shouldn't be a problem. ~ Dave

    The reason for this is mostly caching. This is obviously also a sign of a
    broken caching architecture.
    )r�_hashedr�s  r>r�r�s������(��.�.rKc���t|jd��d|d|jz
dz}|d}|j|dk(r||jz}|sy|dd||d<dj	|�S)z3
    Cuts of the value of the leaf at position
    T)�keependsNrrBrYr@)r	r\r��columnrw)�leaf�positionr�r�s    r>�cut_value_at_positionr�"s}��
��
�
�T�2�3O�H�Q�K�$�)�)�4K�a�4O�P�E�
�a�[�F��y�y�H�Q�K���$�+�+������b�	�'�6�"�E�"�I�
�7�7�5�>�rKc�T�|jdk(rCt|j�dk(r*|jddk(rt|jd�Sy|jdk(r9|j}|ddk(ryt|d�syt	d	�|dd
D��S|jdk(S)zP
    Checks if a path looks like `name` or `name.foo.bar` and not `name()`.
    r
r�rr0rBFr�awaitc3�@K�|]}|jddk(���y�w)r�.N)r5)rrr�s  r>rsz!expr_is_dotted.<locals>.<genexpr>?s����>�A�1�:�:�a�=�C�'�>�s�Nr')r1�lenr5�expr_is_dotted�all)r9r5s  r>r�r�0s����y�y�F���t�}�}���"�t�}�}�Q�'7�3�'>�!�$�-�-��"2�3�3���y�y�K���=�=���A�;�'�!���h�q�k�*���>��!�"��>�>�>��9�9���rKc����fd�}|S)Nc�v��|j�D]%}|jd}|j��vs�%yy)z�
        This is a heuristic. It will not hold ALL the times, but it will be
        correct pretty much for anyone that doesn't try to beat it.
        staticmethod/classmethod are builtins and unless overwritten, this will
        be correct.
        rBTF)�get_decoratorsr5rq)�
function_noder,�dotted_name�method_namess   �r>r�z&_function_is_x_method.<locals>.wrapperDsF���'�5�5�7�	�I�#�,�,�Q�/�K��#�#�%��5��	�rK�)r�r�s` r>�_function_is_x_methodr�Cs�����NrK�staticmethod�classmethod�property�cached_propertyr�)�HNFF)&ryr|�astr�inspectr�weakrefr�parso.pythonr�parso.cacher�parsor	r7rRr6rGrJrWr^rer[r�r�r�r�r�r��get_cached_parent_scoper�r�r�r�r��function_is_staticmethod�function_is_classmethod�function_is_propertyr�rKr>�<module>r�s���	����%��$��B��
��
"�J
!�/��	�	��26�AF�1�B
!��>R��(�@2�2B�C��5�/���&
� 1��@��/�
�>��,�Z�9J�K�rK

Youez - 2016 - github.com/yon3zu
LinuXploit