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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p�{c�*��:�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"d d!��Z%dS)$�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�whileFc�F�g}|j}|dkrD|���}|dur+|jjdkr|dkr|�|��n�|dkr4|�|��|jD]}|t|d���z
}�n�|dkr7|jd	d
kr%|jd}|dkr|t|��z
}nV	|j}|jtvr|s|�|��|D]}|t||��z
}�n#t$rYnwxYw|S)
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.pyr6r6s����F�
�)�C�
�f�}�}��&�&�(�(�	�����4�;�#3�w�#>�#>�9�PS�CS�CS��M�M�$�����	��	�	�	�
�
�d�����]�	C�	C�E��*�5�T�B�B�B�B�F�F�	C�	��	�	��=����#�#��=��$�D��s�{�{��.�t�4�4�4���		B��}�H��y�N�*�*�:�*��
�
�d�#�#�#�!�
B�
B���.�u�j�A�A�A���
B��
�	�	�	��D�	�����Ms�D�
D�Dc#�K�|V�|jd}	|jdkr|jdV�n|jdkr|V�n
|jdksdS|jd}�F)N���T�comp_for��
sync_comp_for�comp_if�r5r1)rA�lasts  r>�get_sync_comp_forsrG:s����
�N�N�N���R� �D�!��9�
�"�"��-��"�"�"�"�"�
�Y�/�
)�
)��J�J�J�J���i�'�'��E��}�R� ��!�c�.�|jdjdkS)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_namerKGs����Q��$��.�.rHc��|j}|j|cxkr|jksntd���d}t|j��D]3\}}||jkr|cS|���}|tvr|}�4dS)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�/@�@�@�@�@��<�=�=�=��G��i�0�1�1�!�!���5��u��&�&��N�N�N��)�)�+�+�
���'�'� �G���4rHc�t�|���}|�!tt|j����SdS)z3 Returns a cleaned version of the docstring token. N�)�get_doc_noder�safe_literal_eval�value)�
scope_noder9s  r>�clean_scope_docstringr^`s9���"�"�$�$�D���
�)�$�*�5�5�6�6�6�
�2rHc���|jdkra|j}|���}|�D|jdkr9|jd}|jdkr!t	t|j����SdS)Nr*�simple_stmtr�stringrY)r1r3�get_next_siblingr5rr[r\)�	tree_node�maybe_strings  r>�find_statement_documentationrelsv���~��$�$��$�	� �1�1�3�3���#�� �M�1�1�+�4�Q�7���$��0�0�#�$5�l�6H�$I�$I�J�J�J�
�2rHc�|�|dd����}|ddks|dvrdSt|��S)N�r�f)�fr�rfrY)�lowerr)r\�	first_twos  r>r[r[xsG���b�q�b�	���!�!�I���|�s���i�<�7�7��r�����rH�Hc���|�|jdkrd}n|jj}|���}|r
|dd�}dd�d�|D�������zdz}t
jd	d
|��}|jr|sd|j�	��z}nd}||z|z}d�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�|]}|���V��dS�N)�get_code)�.0r(s  r>�	<genexpr>z get_signature.<locals>.<genexpr>�s,����;�;�5�e�n�n�&�&�;�;�;�;�;�;rHr.z\s+� z ->�
)r1r'r\�
get_params�join�strip�re�sub�
annotationrr�textwrap�wrap)	r�width�call_string�omit_first_param�omit_return_annotation�params�p�rtype�codes	         r>�
get_signaturer��s������<�9�$�$�$�K�K�!�,�,�K�
�
�
�
!�
!�F����������b�g�g�;�;�F�;�;�;�;�;�A�A�C�C�C�c�I�A�
��v�s�A���A����"8����*�3�3�5�5�5�������?�U�"�D��9�9�X�]�4��/�/�0�0�0rHc��	|j}|D]}t||���dS#t$r|xj|z
c_YdSwxYw)z$
    Move the `Node` start_pos.
    N)r5�mover8�line)r9�line_offsetr5�cs    r>r�r��so��!��=���	!�	!�A���K� � � � �	!�	!���!�!�!��	�	�[� �	�	�	�	�	�!���s� �>�>c��	|jdkr%|jd���j}n�|jdkr%|jd���j}nm|jdkr7|jd������j}n+|������j}n#t$rYdSt$rYdSwxYwd|vrdS||�d��d�}d	|vr|d|�d	���}d
|vr|d|�d
���}|S)zl
    returns (as string) any comment that appears on the same line,
    after the node, including the #
    rJ��	with_stmt�r�N�#�
rv)	r1r5rQ�prefixr2�
get_last_leafr8rO�index)r9�
whitespace�comments   r>�get_following_comment_same_liner��sn��
��9�
�"�"���q�)�8�8�:�:�A�J�J�
�Y�+�
%�
%���q�)�8�8�:�:�A�J�J�
�Y�)�
#�
#���q�)�8�8�:�:�H�H�J�J�Q�J�J��+�+�-�-�;�;�=�=�D�J��������t�t������t�t������*����t���)�)�#�.�.�/�/�0�G��w����.�7�=�=��.�.�.�/���w����.�7�=�=��.�.�.�/���Ns�C
C�
C*�	C*�)C*c�P�|j}|dkr|jdjdkS|dvS)NrArBrC)�
file_inputrrrorC)r1r5)r9�ts  r>�is_scoper��s3���	�A��J����}�Q��$��7�7��Q�Q�QrHc�4���t���d��fd�	}|S)NFc���|��||��S	�|}n#t$r
ix}�|<YnwxYw	||S#t$r�||��x}||<|cYSwxYwrq)�KeyError)�parso_cache_noder9�
include_flows�
for_moduler:�cache�funcs     ��r>�wrapperz(_get_parent_scope_cache.<locals>.wrapper�s�����#��4��m�,�,�,�	6��/�0�J�J���	6�	6�	6�35�5�J��/�0�0�0�	6����	��d�#�#���	�	�	�(,��T�=�(A�(A�A�F�Z��%��M�M�M�	���s��.�.�:�A�A�Fr)r�r�r�s` @r>�_get_parent_scope_cacher��s9�������E�
�
�
�
�
�
�
��NrHc����j}|�dS	t|��r�|jdvr�|j�d��}|j|j�jkrP�jjdkr�jj�krn/�jjdkr�jjd�krn|j}��|S|rTt|tj	��r:|jdkr-t�fd	�|���D����s|S|j}��)
z'
    Returns the underlying scope.
    NT)rrro�:r(�tfpdefr�if_stmtc3�V�K�|]#}|j�jcxko
|jkncV��$dSrq)rMrN)rs�nr9s  �r>rtz#get_parent_scope.<locals>.<genexpr>sY�����=�=� !��K�4�>�E�E�E�E�A�I�E�E�E�E�=�=�=�=�=�=rH)r3r�r1r5r�rMr'�
isinstancer�Flow�any�get_test_nodes)r9r��scoper�s`   r>�get_parent_scoper��s=���
�K�E��}��t���E�?�?�	��z�?�?�?���,�,�S�1�1���>�%�(�2�d�n�D�D��{�'�7�2�2�t�{�7G�4�7O�7O����)�X�5�5�$�+�:N�q�:Q�UY�:Y�:Y�� %��� ��L�
�	�z�%���;�;�	��J�)�+�+��=�=�=�=�%*�%9�%9�%;�%;�=�=�=�=�=�,������+rHc�,�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�4rHc�2�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�����(��.�.rHc��t|jd���d|d|jz
dz�}|d}|j|dkr
||jz}|sdS|dd|�|d<d�|��S)z3
    Cuts of the value of the leaf at position
    T)�keependsNrrBrYr@)r	r\r��columnrx)�leaf�positionr�r�s    r>�cut_value_at_positionr�"s���
��
�T�2�2�2�3O�H�Q�K�$�)�4K�a�4O�3O�P�E�
�a�[�F��y�H�Q�K����$�+������r��b�	�'�6�'�"�E�"�I�
�7�7�5�>�>�rHc�h�|jdkrEt|j��dkr+|jddkrt|jd��SdS|jdkrM|j}|ddkrdSt|d��sdSt	d	�|dd
�D����S|jdkS)zP
    Checks if a path looks like `name` or `name.foo.bar` and not `name()`.
    r
r�rr0rBFr�awaitc3�8K�|]}|jddkV��dS)r�.N)r5)rsr�s  r>rtz!expr_is_dotted.<locals>.<genexpr>?s-����>�>�A�1�:�a�=�C�'�>�>�>�>�>�>rHNr')r1�lenr5�expr_is_dotted�all)r9r5s  r>r�r�0s����y�F����t�}����"�"�t�}�Q�'7�3�'>�'>�!�$�-��"2�3�3�3��u��y�K����=���A�;�'�!�!��5��h�q�k�*�*�	��5��>�>��!�"�"��>�>�>�>�>�>��9���rHc����fd�}|S)Nc���|���D](}|jd}|����vrdS�)dS)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_decoratorsr5rr)�
function_noder,�dotted_name�method_namess   �r>r�z&_function_is_x_method.<locals>.wrapperDsU���'�5�5�7�7�	�	�I�#�,�Q�/�K��#�#�%�%��5�5��t�t�6��urH�)r�r�s` r>�_function_is_x_methodr�Cs#���������NrH�staticmethod�classmethod�property�cached_propertyr�)rmNFF)&rzr}�astr�inspectr�weakrefr�parso.pythonr�parso.cacher�parsor	r7rRr6rGrKrWr^rer[r�r�r�r�r�r��get_cached_parent_scoper�r�r�r�r��function_is_staticmethod�function_is_classmethod�function_is_propertyr�rHr>�<module>r�s��	�	�	�	�����������������%�%�%�%�%�%�������$�$�$�$�$�$�������B�B�B��
��
"�"�"�"�J
!�
!�
!�/�/�/����	�	�	�	�	�	����26�AF�1�1�1�1�B
!�
!�
!����>R�R�R����(����@2�1�2B�C�C��5�5�5�/�/�/�������&
�
�
� 1�0��@�@��/�/�
�>�>��,�,�Z�9J�K�K���rH

Youez - 2016 - github.com/yon3zu
LinuXploit