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__/syntax_tree.cpython-311.pyc
�

p�{c����.�dZddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZmZddlmZddlmZmZddlmZddlmZm Z m!Z!m"Z"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddddddd d!d"d#d$d%d&d'�
Z4d(�e4�5��D��Z6d)�Z7d*�Z8d+�Z9e'e
�,��d-���Z:ej;e7d.�����Z<d/�Z=d0�Z>e7dCd1���Z?ej;dCd2���Z@d3�ZAed4���ZBd5�ZCd6�ZDd7�ZEd8�ZFd9�ZGd:�ZHd;�ZId<�ZJe3jK��d=���ZLe'��d>���ZMd?�ZNGd@�dAe��ZOdB�ZPdS)Dz&
Functions inferring the syntax tree.
�N)�tree)�debug)�parser_utils)�ValueSet�	NO_VALUES�ContextualizedNode�iterator_to_value_set�iterate_values)�
LazyTreeValue)�compiled)�	recursion)�analysis)�imports)�	arguments)�
ClassValue�
FunctionValue)�iterable)�ListModification�DictModification)�TreeInstance)�	is_string�
is_literal�	is_number�get_names_of_node�is_big_annoying_library)�COMPARISON_OPERATORS)�inference_state_method_cache)�VersionInfo)�
annotation)�TreeNameDefinition)�CompForContext��	Decoratee)�plugin_manager�__add__�__sub__�__mul__�
__matmul__�__truediv__�__floordiv__�__mod__�__pow__�
__lshift__�
__rshift__�__and__�__or__�__xor__)
�+�-�*�@�/z//�%�**z<<z>>�&�|�^c�0�i|]\}}|d|dd�z��S)�__r�N�)�.0�k�vs   �</usr/lib/python3/dist-packages/jedi/inference/syntax_tree.py�
<dictcomp>rD2s7��$�$�$���A�A�u�q����u�}�$�$�$�c����fd�}|S)a{
    This is for now the way how we limit type inference going wild. There are
    other ways to ensure recursion limits as well. This is mostly necessary
    because of instance (self) access that can be quite tricky to limit.

    I'm still not sure this is the way to go, but it looks okay for now and we
    can still go anther way in the future. Tests are there. ~ dave
    c�F��|j}|j}	|j|xxdz
cc<d}|j� |���|jur|dz}|j||krt
jd|��tSn#t$r
d|j|<YnwxYw�|g|�Ri|��S)N�i,�dz+In value %s there were too many inferences.)
�	tree_node�inference_state�inferred_element_counts�parent_context�	get_value�builtins_moduler�warningr�KeyError)�context�args�kwargs�nrK�maximum�funcs      �rC�wrapperz$_limit_value_infers.<locals>.wrapper@s�������!�1��	;��3�A�6�6�6�!�;�6�6�6��G��%�-��)�)�+�+��/N�N�N�
�3����6�q�9�G�C�C��
�K�Q�O�O�O� � �D���	;�	;�	;�9:�O�3�A�6�6�6�	;�����t�G�-�d�-�-�-�f�-�-�-s�A*A=�=B�Br?)rWrXs` rC�_limit_value_infersrY7s#���.�.�.�.�.�*�NrEc���t|t��rt||��S|}|�*|j}|jdvrntj|��rd}n|�*|j�|��}|���|�r�|jdk�r�|j	j
�r�|jd}ig}|j|j
k�r9t|��}t|��}d�|D���t�fd�|D����r�|D]�}|j	�||��}	t#|	��dkr�t#|��t#|	��zdkrt%jd|��ig}n�t)|��}
g}|	D]`}t)|
��}t+|��D]:\}
}|���||
<t/|g��||
|j<�;||z
}�a��|D]}|	||j<�
��t#|��dkrOt2}|D]C}|�||��5|t||��z}ddd��n#1swxYwY�D|St7||��S|rt||��St7||��S)N)�if_stmt�for_stmtr[rHc��g|]	}|j��
Sr?��value)r@�es  rC�
<listcomp>zinfer_node.<locals>.<listcomp>us�� @� @� @�Q��� @� @� @rEc3�*�K�|]
}|j�vV��dS�Nr^)r@�i�str_element_namess  �rC�	<genexpr>zinfer_node.<locals>.<genexpr>vs+�����B�B�A�1�7�/�/�B�B�B�B�B�BrE�z,Too many options for if branch inference %s.)�
isinstancer!�_infer_node�parent�typer�is_scope�predefined_names�getrK�is_analysis�children�	start_pos�end_posr�any�infer�lenr�dbg�list�	enumerate�copyrr_r�predefine_names�_infer_node_if_inferred)rR�elementr[�predefined_if_name_dict�if_stmt_test�
name_dicts�if_names�
element_names�if_name�definitions�original_name_dicts�
definition�new_name_dictsrd�	name_dict�resultres                @rC�
infer_noder�Xs>����'�>�*�*�-��7�G�,�,�,��G�
�
��.���<�2�2�2��� ��)�)�	��G��
�
�&�6�:�:�7�C�C���&�7�&���	�)�)�g�.E�.Q�)��'��*���T�
�
��|�3�3�3�)��6�6�H�-�g�6�6�M� @� @�-� @� @� @���B�B�B�B��B�B�B�B�B�
C�'�C�C�G�")�"9�"?�"?���"Q�"Q�K��;�'�'�!�+�+��z�?�?�S��-=�-=�=��B�B�!�I�&T�V]�^�^�^�+-��J�!�E�.2�:�.>�.>�+�%'�
�*5�9�9�J�-1�2E�-F�-F�N�09�.�0I�0I�Z�Z���9�4=�N�N�4D�4D��q� 1�CK�Z�L�CY�CY��q� 1�'�-� @� @�&�.�8�J�J�
9�*4�C�C�I�7B�I�g�m�4�4�C��z�?�?�Q����F�'�
<�
<�	��,�,�W�i�@�@�<�<��k�'�7�;�;�;�F�<�<�<�<�<�<�<�<�<�<�<����<�<�<�<���M�*�7�G�<�<�<�"�	=��w��0�0�0�*�7�G�<�<�<s�H<�<I	�I	c��|}|�5|j}|j�|��}|�t||��S|�5t	||��S)zA
    TODO This function is temporary: Merge with infer_node.
    )rjrmrnri�_infer_node_cached)rRr|rjr}s    rCr{r{�s]���F�
�
����")�":�">�">�v�"F�"F��"�.��w��0�0�0�	�
�
�g�w�/�/�/rE)�defaultc�"�t||��Src)ri)rRr|s  rCr�r��s���w��(�(�(rEc��tjd||j|��|j}|j}|dvrt||��S|dkr#t
tj||��g��S|dkrt||��S|dvr�|j
d}|j
dd�}d}|jd	kr"|jd
krd}|�d��}|�
|��}t|��D]N\}}	|	dkr2|�
||dz��}
t|||	|
��}nt!|||	��}�O|r&|������S|S|d
vr$t
t'j|||��g��S|dvrD|�
|j
d��}|j
dd�D]}t+||��}�|S|dkrA|�
|j
d��|�
|j
d��zS|dkr]|jdkr/|j}t/dt1|j���d|�d����t
t3j|d��g��S|dkrGt||j
d��}|j
ddd�D]}
|�|
|���}�|S|dkr |�
|j
d��S|dkr2t9j||j
d�����S|dkr�t?|j
��r||j
djdkrf|j
dj
d}|�
|���d��� ��}|���StBS|dkr |�
|j
d��StE||��S) Nzinfer_node %s@%s in %s)�name�number�string�atom�strings�keyword�fstring�lambdef�	expr_stmt)�power�	atom_exprrrHFr��awaitTr8)�testlist_star_expr�testlist)�not_test�factor����test�operatorz...zunhandled operator z in � �Ellipsis�dotted_namer>)�name_context�
eval_input�	annassign�
yield_expr�	yield_arg�__iter__�namedexpr_test)#rrvrqrKrk�
infer_atomrr�from_context�infer_expr_stmtrpr_�popr�rx�_infer_comparison�
infer_trailer�py__await__�py__stop_iteration_returnsr�SequenceLiteralValue�infer_factorrj�AssertionError�reprr�builtin_from_name�py__getattribute__r�infer_annotation�execute_annotationru�execute_with_valuesr�
infer_or_test)rRr|rK�typ�first_childrp�	had_await�	value_setrd�trailer�rightr��origin�	next_name�
generatorss               rCriri�s[��
�I�&���1B�G�L�L�L��-�O�
�,�C�
�S�S�S��'�7�+�+�+�	�	�	�	���3�G�W�E�E�F�G�G�G�	��	�	��w��0�0�0�	�&�	&�	&��&�q�)���#�A�B�B�'���	���y�(�(�[�->�'�-I�-I��I�"�,�,�q�/�/�K��&�&�{�3�3�	�%�h�/�/�
	C�
	C�L�Q���$����*�*�8�A��E�?�;�;��-�����	��	���%�g�y�'�B�B�I�I��	H��(�(�*�*�E�E�G�G�G���	�3�	3�	3���6���QX�Y�Y�Z�[�[�[�	�&�	&�	&��&�&�w�'7��';�<�<�	��(��"��-�	:�	:�H�$�Y��9�9�I�I���	�����"�"�7�#3�A�#6�7�7��$�$�W�%5�b�%9�:�:�;�	<�	�
�	�	��=�E�!�!��^�F� �.�4��
�CV�CV�CV�CV�X^�X^�X^�!_�`�`�`���3�O�Z�P�P�Q�R�R�R�	�
�	�	��w��(8��(;�<�<�	� �)�!�$�Q�$�/�	V�	V�I�!�4�4�Y�W�4�U�U�I�I���	��	�	��!�!�'�"2�1�"5�6�6�6�	��	�	��*�7�G�4D�Q�4G�H�H�
�
�
!�
!�	"�	��	�	��w�� � �	;�W�%5�a�%8�%=��%L�%L��&�q�)�2�1�5�G� �+�+�G�4�4�#�#�J�/�/�0C�0C�0E�0E�
��8�8�:�:�:���	� �	 �	 ��!�!�'�"2�1�"5�6�6�6��W�g�.�.�.rEc��|jdd�\}}|dkrd}|dkr=|j\}}}|�t||��t||����St	jd||��|dkr|�||���S|dks
Jd|z���tj|j	|||��}|�
|��S)	Nr>�)�[zinfer_trailer: %s in %s�.)r��name_or_str�(ztrailer_op is actually %s)rp�get_item�_infer_subscript_listrrrvr�r�
TreeArgumentsrK�execute)rR�atom_valuesr��
trailer_op�node�_rSs       rCr�r�s���'����+��J���s�{�{����S���%�.��
�D�!��#�#�!�'�4�0�0��w��0�0�
�
�	
�
	�	�+�W�k�B�B�B������1�1�$� �2���
�
��$�$�$�&A�J�&N�$�$�$��*�7�+B�G�T�SZ�[�[�D��&�&�t�,�,�,rEc���|j}�jdkr�tj�ddd��p�}|jdkr0t	�fd�|���D����s�}n
|jdkr�}|j}t���rd}|��|���S�jdkrP�j	d	vr(ttj|�j	��g��S�j	d
krtSJd�z���t�tj��rB|j��j	��}ttj||��g��S�jd
krQt'|�jd��}�jdd�D]$}t'||��}t+||d|��}�%|S�jdkrtj|��S�j}|ddkr]t/|��dksJ|djdkrt/|dj��dks|�|d��S	|djd}	|	dkr%	|djd}	n#t2$rYnwxYw|	jdvr$tt5j||���g��Sn#t2t8f$rYnwxYw|d}
	|
j}n#t8$rg}YnwxYw|ddkr%|
dksd|vsd|vrt5j||���}nt5j||���}t|g��S)z�
    Basically to process ``atom`` nodes. The parser sometimes doesn't
    generate the node (because it has just one child). In that case an atom
    might be a name or a literal as well.
    r�r�r�r[c3�V�K�|]#}|j�jcxko
|jkncV��$dSrc)rqrr)r@rUr�s  �rCrfzinfer_atom.<locals>.<genexpr>%sE�����`�`�Q�q�{�d�n�@�@�@�@�q�y�@�@�@�@�`�`�`�`�`�`rEN��positionr�)�False�True�None�yieldFzCannot infer the keyword %sr�rrHr2r�r�r>�
testlist_comp�:�)�comp_for�
sync_comp_for�{�}r8)rKrkr�search_ancestorrs�get_test_nodesrq�_is_annotation_namer�r_rrr�rrh�Literal�compiled_subprocess�safe_literal_eval�create_simple_objectr�rpr��get_string_value_setrur��
IndexErrorr�comprehension_from_atom�AttributeError�DictLiteralValuer�)
rRr��state�stmtr�r�r�r��cr��
array_node�array_node_c�	new_values
 `           rCr�r�s����
�#�E��y�F����#�D�+�y�)�L�L�T�PT���9�	�!�!��`�`�`�`�$�J]�J]�J_�J_�`�`�`�`�`�
����
�Y�)�
#�
#��D��>���t�$�$�	��H��)�)�$��)�B�B�B�	
��i�	�	��:�2�2�2��X�7��t�z�J�J�K�L�L�L�
�Z�7�
"�
"���:�3�d�:�:�:�:�	�D�$�,�	'�	'�0%��*�<�<�T�Z�H�H����6�u�f�E�E�F�G�G�G�	
��i�	�	��w��
�a�(8�9�9�	��m�A�B�B�'�	J�	J�F��w��/�/�E�)�'�9�c�5�I�I�I�I���	
��i�	�	��,�U�3�3�3��M���Q�4�3�;�;�s�1�v�v��{�{��!��	�_�4�4���!��
�.�.��2�2��%�%�a��d�+�+�+�	���t�}�Q�'�H��3���� ��t�}�Q�/�H�H��!�����D������}� =�=�=���!A��7�D�"�"�!����>���N�+�	�	�	��D�	���� �q�T�
�	�%�.�L�L���	�	�	��L�L�L�	�����Q�4�3�;�;�J�#�-�-���1D�1D�#�|�3�3� �1�%��$�G�G�I�I� �5�e�W�d�K�K�I����$�$�$s6�J3�!I5�5
J�J�3K�K�K�K*�)K*c��tj|j|��5}|rE|�&tj|||��}|r|cddd��St|||��cddd��S	ddd��n#1swxYwYtSrc)r
�execution_allowedrKr�"find_type_from_comment_hint_assign�_infer_expr_stmtr)rRr��	seek_name�allowed�pep0484_valuess     rCr�r�os	��	�	$�W�%<�d�	C�	C�>�w��	>��$��A�'�4�QZ�[�[��!�*�)�
>�>�>�>�>�>�>�>�$�G�T�9�=�=�>�>�>�>�>�>�>�>�	>�>�>�>�>�>�>�>�>�>�>�>����>�>�>�>��s�A0�A0�0A4�7A4c�������d�}tjd||��|���}��|���|r t	�|��}t|����t
|���d��}||��\}�|dvo
|jdk}|s|�r�|�	d���dj
}	��|	|j�	��}
|r$���fd
��t�fd�|
D������nMtj|��}|j
dd�|_
tj|d
��}|��|jd
kr�r�t#j|��r�|���}
t)�|
��}t+|����|����}|D]}}|jdj
|���i}��||��5��|��}t5�|
||��}
ddd��n#1swxYwY�~|
�nt5�|
|����tjd����S)aD
    The starting point of the completion. A statement always owns a call
    list, which are the calls, that a statement does. In case multiple
    names are defined in the statement, `seek_name` returns the result for
    this name.

    expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) |
                     ('=' (yield_expr|testlist_star_expr))*)
    annassign: ':' test ['=' test]
    augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
                '<<=' | '>>=' | '**=' | '//=')

    :param stmt: A `tree.ExprStmt`.
    c���|jd}|jdvrdS|jd}|jdkst|j��dkrdS|jd}|jddk|jdfS)	Nr)r�r�)FNr�r>r�r�rH)rprkru)r�r�r�r�s    rC�
check_setitemz'_infer_expr_stmt.<locals>.check_setitem�s����M�!�$�	��>�!7�7�7��;��!�!�$���9����#�i�&8�"9�"9�Q�">�">��;��$�R�(�����"�c�)�7�+;�A�+>�>�>rEzinfer_expr_stmt %s (%s)N)�=Nr�T)�include_setitemrr�c���t����}|jdkrt|�|��S|jdkrt|�|��S|S)N�dictrw)�ContextualizedSubscriptListNode�
array_typerr)rBr�rR�
subscriptlistr�s  ���rC�to_modz _infer_expr_stmt.<locals>.to_mod�sU���3�G�]�K�K���<�6�)�)�+�A�y�!�<�<�<��\�V�+�+�+�A�y�!�<�<�<��rEc3�.�K�|]}�|��V��dSrcr?)r@rBrs  �rCrfz#_infer_expr_stmt.<locals>.<genexpr>�s+����� @� @�q������ @� @� @� @� @� @rEr�r\rHzinfer_expr_stmt result %s)rrv�get_rhsr�r �check_tuple_assignments�next�yield_operatorsrk�get_defined_namesr_r�rqrryrr�r�for_stmt_defines_one_name�get_testlistrrwrt�iteraterprzr�)rRr�r�r��rhsrU�first_operator�
is_setitem�is_annassignr��left_valuesr�r\r��cn�ordered�
lazy_value�dct�trrr�s`                  @@@rCr�r�}s������ ?�?�?�
�I�'��y�9�9�9�
�,�,�.�.�C��"�"�3�'�'�I��:��w�	�2�2��+�A�y�9�9�	��$�.�.�0�0�$�7�7�N� -�
�d� 3� 3��J�
�!��4�Z��9L�PZ�9Z�L��#Y�z�#Y��%�%�d�%�;�;�A�>�D���0�0����0�O�O���	Y�
�
�
�
�
�
�
�!� @� @� @� @�K� @� @� @�@�@�I�I��y��0�0�H�%�^�C�R�C�0�H�N��+�D�*�=�=�H��#��
��(C�(C�	�(C�$�>�x�H�H�)D�
 �,�,�.�.��'���6�6���r�x�x�z�z�1�1�"�5�5�6�6��")�[�[�J�#�,�Q�/�5�z�7G�7G�7I�7I�J�C� �0�0��3�?�?�[�[�#�.�.�s�3�3��&7���h�XY�&Z�&Z��[�[�[�[�[�[�[�[�[�[�[����[�[�[�[��(�	�	�-�g�{�H�i�X�X�	�	�I�)�9�5�5�5��s�(H<�<I	�I	c	�2�t|j��}|�t|����}|D]�}t|��}|jdkr$d�d�|jD����}|dvr_t
d�|D����}|dhkr|dkr|�|��}��|dhkr|dkr|�|��}��t||||�|����}��tj	d	|��|S)
N�comp_opr�c3�$K�|]}|jV��dSrcr^)r@r�s  rCrfz infer_or_test.<locals>.<genexpr>�s$����C�C�A���C�C�C�C�C�CrE)�and�orc3�>K�|]}|���V��dSrc)�
py__bool__)r@�lefts  rCrfz infer_or_test.<locals>.<genexpr>�s,����A�A�4�T�_�_�.�.�A�A�A�A�A�ArETrFzinfer_or_test types %s)
�iterrpr�rrk�join�setr�rrv)rR�or_test�iterator�typesr�r��
left_boolss       rCr�r��s<���G�$�%�%�H����t�H�~�~�.�.�E��A�A���X�����=�I�%�%��x�x�C�C��1B�C�C�C�C�C�H��}�$�$��A�A�5�A�A�A�A�A�J��d�V�#�#��u�$�$�#�.�.�u�5�5�E����w�&�&��u�$�$�#�.�.�u�5�5�E��&�g�u�h�&-�&8�&8��&?�&?�A�A�E�E�	�I�&��.�.�.��LrEc#��K�|D]o}|dkr&t|��r|���V��.|dkr7|���}|�dStj|j|��V��k|V��pdS)z6
    Calculates `+`, `-`, `~` and `not` prefixes.
    r3�notN)r�negater!rr�rK)r�r�r_�bs    rCr�r��s�����
�
�
���s�?�?�����
%��l�l�n�n�$�$�$��
��
�
�� � �"�"�A��y�����/��0E�1�u�M�M�M�M�M�M��K�K�K�K�
�
rEc���t}|D][}t|��r7tj||jj��}||���z}�H|t|g��z}�\|Src)rrrr�r��string_namer�r)rKr��
new_resultr��clss     rC�_literals_to_typesr2�sq���J��*�*���c�?�?�	*��,�_�c�h�>R�S�S�C��#�1�1�3�3�3�J�J��(�C�5�/�/�)�J�J��rEc�������j�t�t��r�}nt�j��}|r�s#|pt�ptz}t�|��S|dkrBt
d�tj|���D����rtj
|�f��St|��t���zdkrt�|�z��Stj
����fd�|D����S)Nr:c3�fK�|],}|���p|���V��-dSrc)�is_class�is_compiled)r@r_s  rCrfz$_infer_comparison.<locals>.<genexpr>sQ����%�%��	�����/�E�-�-�/�/�%�%�%�%�%�%rE�c	3�H�K�|]}�D]}t��|�|��V���dSrc)�_infer_comparison_part)r@r"r�rRr��right_valuesr�s   ����rCrfz$_infer_comparison.<locals>.<genexpr>s^�����&�&��)�&�&��'�u�g�t�X�u�M�M�&�&�&�&�&�&�&rE)rKrh�strr_rr2�all�	itertools�chainr�	from_setsru)rRrr�r:�operator_strr�r�s` ``  @rCr�r�sD�������#�E��(�C� � �+�����8�>�*�*����l���*��|�/H�y�I��!�%��0�0�0�	��	�	��%�%��_�[�,�?�?�%�%�%�"�"�	�
�!�;��"=�>�>�>�
�{���c�,�/�/�/�!�3�3�%�e�[�<�-G�H�H�H��%�&�&�&�&�&�&�&�'�&�&�&���
rEc�b�tj|ddd��}|�dS|jdvr)|j}|�|j|jcxko
|jkncSna|jdkrV|j}t|��dkr<|djdkr+|dj|jcxko|djkncSdS)N�param�funcdefr�F)rBrCrHr�)rr�rkrrqrrrpru)r��ancestor�annr�s    rCr�r�#s����#�D�'�9�k�J�J�H����u��}�,�,�,��!���?��=�D�N�@�@�@�@�S�[�@�@�@�@�@��	��+�	%�	%�����q�6�6�A�:�:�!�A�$�)�{�2�2��Q�4�>�T�^�B�B�B�B�a��d�l�B�B�B�B�B��5rEc��|jdkS)Nrw�rr^s rC�_is_listrH3s����v�%�%rEc��|jdkS)N�tuplerGr^s rC�	_is_tuplerK7s����w�&�&rEc�F�tj|t|����Src)rr�r;)rK�bool_s  rC�_bool_to_valuerN;s���%�o�s�5�z�z�B�B�BrEc�>�t|tj��sdSg}|���D]i}t|t��sdS|j}|jdkrdS	|�t|j	�����X#t$rYdSwxYw|S)Nr�)rhrr��
py__iter__r�datark�append�intr_�
ValueError)r_�numbersrr�s    rC�_get_tuple_intsrV?s����e�X�:�;�;���t��G��&�&�(�(�	�	�
��*�m�4�4�	��4�4�����9�� � ��4�4�	��N�N�3�t�z�?�?�+�+�+�+���	�	�	��4�4�4�	�����Ns�#'B�
B�Bc���t|��}t|��}t|t��r|}nt|j��}|dkrtt|tj��st
|��rt|g��St|tj��st
|��rt|g��S�n|dkr�|r|st
|��r%t
|��r|�||��St|��rt|��st|��r4t|��r%tt	j|||f��g��S�n{|dkr|r|r|�||��S�nY|dkrt|g��S|tv�r.|�
��r/|�
��r|�||��}|r|Sn�|dvr?t|}	|	||��}
|dv|
krtt||
��g��St|t��rft!|��}|�Ut#jj||jjt+|����}tt||��g��Stt|d��t|d��g��S|d	vrt,Sd
�}
|dvr:||kr4|
|��s)|
|��sd}t/j|d
||||fz��|���s|���rt,St4|}|�|��}|r|�|��}|r|S|s;t:|}|�|��}|�|��}|r|St||g��}t=jd||��|S)Nr4r2r3r7)�isz!=�==zis not)rXrYTF)�inznot inc�H�t|t��o
|jjdvS)z4Checks if a Jedi object is either a float or an int.)rS�float)rhrr�r/)�objs rC�checkz%_infer_comparison_part.<locals>.check�s'���#�|�,�,�5��H� �$4�4�	5rE)r2r3z7TypeError: unsupported operand type(s) for +: %s and %sztype-error-operationz Used operator %s resulting in %s) rrhr;r_r�Sequencerr�execute_operationrHrK�MergedArrayrr6rNrrVr�access�environment�version_inforJrr�addr5�operator_to_magic_methodr�r�� reverse_operator_to_magic_methodrrv)rKrRr"r�r��l_is_num�r_is_num�str_operatorr��	operationrMrd�bool_resultr^�message�method_name�
magic_methods�reverse_method_names                  rCr9r9Psn������H�����H��(�C� � �+�����8�>�*�*���s����d�H�-�.�.�	%�)�D�/�/�	%��T�F�#�#�#�
��x�0�
1�
1�	%�Y�u�5E�5E�	%��U�G�$�$�$�	%�	��	�	��	T��	T�I�d�O�O�	T�	�%�8H�8H�	T��)�)�%��>�>�>�
�d�^�^�	T�����	T�9�T�?�?�	T�y�QV�GW�GW�	T��X�1�/�D�%�=�Q�Q�R�S�S�S��	��	�	��	?��	?��)�)�%��>�>�>��	��	�	�������	�-�	-�	-������	T�%�"3�"3�"5�"5�	T��+�+�E�<�@�@�F��
��
�
��;�;�;�0��>�	�!�	�$��.�.��!�L�0�U�:�:�#�^�O�U�%K�%K�$L�M�M�M��$��,�,�
T�.�u�5�5���+�"*�/�"F�x�"P�'�3�@��l�+�+�#�#�K�$�^�O�[�%Q�%Q�$R�S�S�S���?�D�1�1��?�E�2�2�
���	�
�)�	)�	)���5�5�5��z�!�!�h�(�&:�&:��U�4�[�[�';�$)�E�%�L�L�';�K����W�4�h���e�}�,�	.�	.�	.��}�}����%�.�.�*�*����*�<�8�K��+�+�K�8�8�M����2�2�5�9�9���	��M���>�|�L���0�0�1D�E�E�
��2�2�4�8�8���	��M�
�t�U�m�
$�
$�F�	�I�0�(�F�C�C�C��MrEc��t}|���j}|��|����|jg��}d}|D]�}|j}|jdkrw|jdjdkratj
|��|jk}	|	rBd}|tj||jdjd���
��z}��|r|Sg}
|�dd���}|��|j}|jdkr�|�|��}|���rtSt#|�����}
|
�|j��}t'jd�|D����S|jd	vr%|�|��}t+||��S|j}|d
krtj|||��}
|
r|
S|dkrtj|||��}
|
r|
S|dvr�	|j||j}
�n#t2$rqt5||jd
��}t7|���||jjdk���}t;||��}t=||��}
Y�n�wxYw|dkrt?|||��}
�n~|dkr�|� |�!|����}|jjdkrO|�"d��}|�#��}|�$���%��S|�"d��}|�#��S|d	vrtMj'||��}
n�|dvrtQ||��}
n�|dkrN|� |�)���)����}|�#��}
nE|dkrt}
n7|dkrt}
n)|dkrtA||��}
ntUd|z���|
S)NFr�rHr�T)�import_name_alwaysr�global_stmtc3�>K�|]}|���V��dSrc)rt)r@r�s  rCrfz&tree_name_to_values.<locals>.<genexpr>�s*����%E�%E�t�d�j�j�l�l�%E�%E�%E�%E�%E�%ErE)�import_from�import_namer\�	with_stmt)r\r�r�r��
async_stmt)�contextualized_node�is_async�
__aenter__�	__enter__)rC�classdef�try_stmtrB�del_stmtr�zShould not happen. type: %s)+r�get_root_contextrJ�get_used_namesrnr_rjrkrpr�get_parent_scoperr�r��get_definition�create_context�	is_moduler�get_filtersrr?r��find_type_from_comment_hint_for� find_type_from_comment_hint_withrmrQrr
rtr r
r�r��get_test_node_from_namer�r�r�r�r�infer_import�_apply_decorators�get_previous_siblingrT)rKrR�	tree_namer��module_node�names�found_annotationr�r��
correct_scoper(r�r��filterr�r�	for_typesrU�value_managers�
enter_methods�coro�
exceptionss                      rC�tree_name_to_valuesr��s���I��*�*�,�,�6�K����*�*�,�,�0�0���"�E�E�� ���		+�		+�D���I��~��,�,��1C�A�1F�1K�{�1Z�1Z� ,� =�d� C� C�w�GX� X�
� �+�'+�$���!<���!3�A�!6�!?��!B�"�"�(�(�*�*�+�I���	����E��#�#�t�T�#�R�R�D��|�����9�
�%�%��&�&�y�1�1�A��{�{�}�}�
!�!� ��!�-�-�/�/�*�*�F��J�J�y��/�/�E��%�%E�%E�u�%E�%E�%E�E�E�E�
�Y�<�
<�
<��&�&�y�1�1�A��a��+�+�+�
�)�C�
�j����:�7�D�)�T�T���	��L�
�k����;�G�T�9�U�U���	��L�
�7�7�7�
	:��,�T�2�9�?�C�E�E���	:�	:�	:�#�G�T�]�1�-=�>�>�B�&����
�
�$&���)�\�9����I�
#�7�I�6�6�A�+�A�y�9�9�E�E�E�	:����

��	�	����y�9�9���	��	�	� �+�+�D�,H�,H��,S�,S�T�T���;��|�+�+�+�=�=�l�K�K�M� �4�4�6�6�D��#�#�%�%�@�@�B�B�B�&�9�9�+�F�F�
��0�0�2�2�2�	�.�	.�	.��$�W�i�8�8���	�'�	'�	'�!�'�4�0�0���	�
�	�	��'�'�	�(F�(F�(H�(H�(]�(]�(_�(_�`�`�
��.�.�0�0���	�������	�
�	�	����	� �	 �	 ��7�D�)�)����6��<�=�=�=��Ls�H.�.A7J)�(J)c��	�|jdkrt|j||����	ntj||���	t�	g��x}}t
|��r|St|�����D�]i}tj
d||d���tj��5|�|j
d��}|j
dd�}|r-tjd	|��}||_t#|||��}t%|��sB|�d
���}|dkrtjd
||��|cddd��cS|�t-j|g����}t%|��s%tjd|��|cddd��cS	ddd��n#1swxYwYtj
d|d�����k||krt�	fd�|D����S|S)z�
    Returns the function, that should to be executed in the end.
    This is also the places where the decorators are processed.
    r})rMrJzdecorator: %s %s�MAGENTA)�colorrHr>r�r�F)�include_prefixz	@runtime
zdecorator not found: %s on %sNz)not possible to resolve wrappers found %szdecorator end %sc�0��g|]}t|�����Sr?r")r@r��decoratee_values  �rCraz%_apply_decorators.<locals>.<listcomp>>s#���G�G�G�1��1�o�6�6�G�G�GrE)rkrrKrr�rr�reversed�get_decoratorsrrv�increase_indent_cmr�rpr�
PythonNoderjr�ru�get_coderPr�r�ValuesArguments)
rRr��initial�values�dec�
dec_values�
trailer_nodesr��coder�s
         @rCr�r�s�����y�J���$��#�"��
�
�
���(�4�W�d�C�C���� 1�2�2�2�G�f��w�'�'���
���+�+�-�-�.�.�?�?��
�	�$�c�6��C�C�C�C�
�
%�
'�
'�	�	� �+�+�C�L��O�<�<�J��L��2��.�M��
I��/�)�]�C�C��!$���*�7�J��H�H�
��z�?�?�
��|�|�5�|�9�9���<�'�'��M�"A�3��M�M�M��!	�	�	�	�	�	�	�	�	�	�$ �'�'�	�(A�6�(�(K�(K�L�L�F��v�;�;�
��
�I�4�P�P�P��+	�	�	�	�	�	�	�	�	�	�&
�'	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�.	�	�$�f�I�>�>�>�>�>�
�����G�G�G�G��G�G�G�H�H�H��Ms�,B!G�A
G�G		�G		c�z�d}|���D]�\}}t|j|��}|�|��}t	|t
��r	tcSd}||kr:	t|��}||jz
}n#t$rtcYcSwxYw||k�:|�
��}��|S)z(
    Checks if tuples are assigned.
    Nr)�assignment_indexesrrMrrh�slicerr�max�
StopIterationrt)r�r�r�indexr�r�iteratedrds        rCr
r
Bs����J��.�.�0�0�'�'���t�
�� 3�T�
:�
:���$�$�R�(�(���e�U�#�#�	�����
���5�j�j�	
$�!�(�^�^�
��Z�^�#����!�
!�
!�
!�
!� � � � � �
!�����5�j�j��$�$�&�&�	�	��s�-B�B�Bc��eZdZd�ZdS)rc�6�t|j|j��Src)r�rRr�)�selfs rCrtz%ContextualizedSubscriptListNode.infer^s��$�T�\�4�9�=�=�=rEN)�__name__�
__module__�__qualname__rtr?rErCrr]s#������>�>�>�>�>rErc��|dkr%ttj|ddd��g��S|jdkr�|jddks�g}|jD]y}|dkr|s|�d��� |jdkr9t
|j��dkr |�|jd���d|�|���z|dgd	t
|��z
zz
}ttj|g|�R�g��S|jd
kr)ttj|j||��g��S|�	|��S)z,
    Handles slices in subscript nodes.
    r�N�	subscriptrr��sliceopr>rHr�r)
rr�SlicerkrprRrur�rKr�)rRr�r��els    rCr�r�bs^��
��|�|������t�T�B�B�C�D�D�D�	��{�	"�	"�5�>�!�+<��+C�+C����.�	"�	"�B��S�y�y��(��M�M�$�'�'�'����I�%�%��r�{�#�#�q�(�(��M�M�"�+�a�.�1�1�1���
�
�b�!�!�!�!��4�&�A��F���O�,�,������9�&�9�9�9�:�;�;�;�	���	&�	&���6�w�7N�PW�Y^�_�_�`�a�a�a����e�$�$�$rErc)Q�__doc__ryr=�parso.pythonr�jedirr�jedi.inference.base_valuerrrr	r
�jedi.inference.lazy_valuer�jedi.inferencerr
rrr�jedi.inference.valuerrr�#jedi.inference.value.dynamic_arraysrrr�jedi.inference.helpersrrrrr�jedi.inference.compiled.accessr�jedi.inference.cacher�!jedi.inference.gradual.stub_valuer�jedi.inference.gradualr�jedi.inference.namesr �jedi.inference.contextr!�jedi.inference.value.decoratorr#�jedi.pluginsr$rf�itemsrgrYr�r{r��increase_indentrir�r�r�r�r�r�r2r�r�rHrKrNrVr9�decorater�r�r
rr�r?rErC�<module>r�s�������������������������������*�*�*�*�*�*�*�*�*�*�*�*�*�*�3�3�3�3�3�3�#�#�#�#�#�#�$�$�$�$�$�$�#�#�#�#�#�#�"�"�"�"�"�"�$�$�$�$�$�$�:�:�:�:�:�:�:�:�)�)�)�)�)�)�R�R�R�R�R�R�R�R�-�-�-�-�-�-�/�/�/�/�/�/�/�/�/�/�/�/�/�/�?�?�?�?�?�?�=�=�=�=�=�=�9�9�9�9�9�9�-�-�-�-�-�-�3�3�3�3�3�3�1�1�1�1�1�1�4�4�4�4�4�4�'�'�'�'�'�'�
�	�	�	�	�
�	�
�
�
�	�	�	���� $�$�!9�!?�!?�!A�!A�$�$�$� �
���BE=�E=�E=�P
0�
0�
0���i�0�0�0�)�)�1�0�)����K/�K/�����K/�\-�-�-�0R%�R%�R%�j�
�
�
���
���J�J�J���J�Z���2������"������<
�
�
� &�&�&�'�'�'�C�C�C����"Z�Z�Z�z�����]�]���]�D����.�.� ��.�b���6>�>�>�>�>�&8�>�>�>�
%�%�%�%�%rE

Youez - 2016 - github.com/yon3zu
LinuXploit