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 :  /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__/sys_path.cpython-312.pyc
�

Še�'����ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZdd
lmZdZdefd
�Zd�Zd�Zeg��d��Zd�Zd�Zdefd�Zdefd�Zd�Zd�Zy)�N)�Path)�all_suffixes)�inference_state_method_cache)�ContextualizedNode)�	is_string�get_str_or_none)�get_cached_code_lines)�FileIO)�settings)�debug�
�str_pathc��t|�}|j�r|S|j�}|�y|j}|j	|�j�S�N)r�is_absolute�
py__file__�parent�joinpath�absolute)�module_contextr�path�module_path�base_dirs     �9/usr/lib/python3/dist-packages/jedi/inference/sys_path.py�	_abs_pathrsZ����>�D������� �+�+�-�K�����!�!�H����T�"�+�+�-�-�c#��K�t|jddd�|jddd��D�]\}}	|dvsJ�|jdvrt|j�dkDsJ�|j}|djdk(r|djdk(sJ�|d}|jdd	k(r|jdjd
k(sJ�	t
|j|�|�}|j�j|�D]D}|j�D]/}t|�s�t||j��}	|	��,|	���1�F��!y#t
$rY��/wxYw�w)a�
    Extracts the assigned strings from an assignment that looks as follows::

        sys.path[0:0] = ['module/path', 'another/module/path']

    This function is in general pretty tolerant (and therefore 'buggy').
    However, it's not a big issue usually to add more paths to Jedi's sys_path,
    because it will only affect Jedi in very random situations and by adding
    more paths than necessary, it usually benefits the general user.
    N��)�=z+=��power�	atom_exprr�name�sys�.r)
�zip�children�type�len�value�AssertionErrorr�create_context�infer�iteraterr�get_safe_value)
r�	expr_stmt�assignee�operator�c�trailer�cn�
lazy_valuer+�abs_paths
          r�_paths_from_assignmentr9 s|����"�)�"4�"4�S�q�S�"9�9�;M�;M�a�d�QR�d�;S�T�'���(�	��{�*�*�*��=�=�$:�:��H�%�%�&��*�
+�+��!�!�A��Q�4�9�9��&�1�Q�4�:�:��+>�>�>���d�G��#�#�A�&�#�-�'�2B�2B�1�2E�2K�2K�v�2U�U�U�

� �� =� =�i� H�)�
T���(�(�*�,�,�R�0�	'�J�#�)�)�+�
'���U�#�(���9M�9M�9O�P�H��+�&��	
'�	'�1'��(�	��	�s6�4E"�BE�AE"�)E"�E"�	E�E"�E�E"c#�K�|jdk(rK|jddk(r9|jdk(r*|jddk(rt|j�dk(sy|jdj}|dvry|jd}|d	k(r&t|j�d
vr|jd}|j	|�j|�D]#}t
|�}|��t||�}|�� |���%y�w)zE extract the path from either "sys.path.append" or "sys.path.insert" r5rr&�(�Nr)�insert�appendr=)r<�r)r)r(r*r+r-�
infer_noderr)r�trailer1�trailer2r$�argr+�pr8s        r�_paths_from_list_modificationsrEKs�����
�M�M�Y�&�8�+<�+<�Q�+?�3�+F��
�
��*�x�/@�/@��/C�s�/J��H�%�%�&�!�+�����Q��%�%�D��'�'��
�
�
�A�
�C��x��C����-��7��l�l�1�o���.�.�s�3�>�>�s�C����E�"���9���^�Q�/�����N�
�s�C3C=�6C=)�defaultc	��d�}|j�gSg}	|jj�d}||�D]�\}}|j}t|j�dk\r)|jt
|g|jdd�����S|��V|jdk(s�f|jt||����|S#t$rY|SwxYw)z6
    Detect sys.path modifications within module.
    c3�dK�|D]�}|jj}|��|jdvs�+|j}|djdk(s�J|djdk(s�]|djdk(s�p|djd}|jdk(s��|jdk(s��||f����y�w)Nr!rr$r%rr5r)rr)r(r+)�namesr$r"r4�ns     r�get_sys_path_powersz9check_sys_path_modifications.<locals>.get_sys_path_powersis������	*�D��K�K�&�&�E�� �U�Z�Z�3I�%I��N�N���Q�4�9�9��&�1�Q�4�:�:��+>��a�D�I�I��2��!��
�
�a�(�A��v�v��'�A�G�G�v�,=�"�E�k�)�	*�s-�B0�B0�B0�B0�"B0�5!B0�B0�'	B0rr?rr1)
�	tree_node�get_used_namesrr*r(�extendrEr)r9�KeyError)rrK�added�possible_namesr$r"r1s       r�check_sys_path_modificationsrRds���
	*����'��	��E�P�'�1�1�@�@�B�6�J��/�~�>�		P�K�D�%����I��5�>�>�"�a�'����2�&��).����!�)<���
�&�9�>�>�[�+H����3�N�I�N�O�		P��L���
���L�
�s�B?�?	C�Cc��t�}t|�D]8}t||�D]'}|j|�t	|�t
k\s�'�8�:|Sr)�set�_get_buildout_script_paths�_get_paths_from_buildout_script�addr*�_BUILDOUT_PATH_INSERTION_LIMIT)�inference_state�script_path�buildout_script_paths�buildout_script_pathrs     r�discover_buildout_pathsr]�s^���E�� :�;� G���3�O�EY�Z�	�D�!�%�%�d�+��(�)�-K�K��	��!� rc
#�XK�tt|��}	|j|dtj��}ddlm	}||||dt|j|���j�}t|�Ed{���y#t
$rt
jd|�YywxYw7�*�w)NT)�file_io�cache�
cache_pathz(Error trying to read buildout_script: %sr)�ModuleValue)r_�string_names�
code_lines)r
�str�parser�cache_directory�IOErrorr�warning�jedi.inference.valuerbr	�grammar�
as_contextrR)rYr\r_�module_noderbrs      rrVrV�s������S�-�.�/�G��%�+�+����/�/�,�
��1� �����(��)@�)@�BV�W�	�
�j�l��,�N�;�;�;����
�
�
�@�BV�W����<�s4�B*�"B�AB*�=B(�>B*�B%�"B*�$B%�%B*rc��|jD]&}	|j|�j�r|cS�(y#t$rY�5wxYwr)�parentsr�is_file�OSError)r�filenamers   r�_get_parent_dir_with_filers�sR���,�,���	����x�(�0�0�2��
�3�����	��	�s� 7�	A�A�search_pathc#��K�t|d�}|sy|jd�}|j�sytj|�D]R}	|j|�}t|d�5}|j
�}|jd�rd|vr|��ddd��Ty#1swY�xYw#ttf$r(}tjt|��Yd}~��d}~wwxYw�w)z�
    if there is a 'buildout.cfg' file in one of the parent directories of the
    given module it will return a list of all files in the buildout bin
    directory that look like python files.

    :param search_path: absolute path to the module.
    zbuildout.cfgN�bin�rz#!�python)
rsr�exists�os�listdir�open�readline�
startswith�UnicodeDecodeErrorrhrrire)rt�project_root�bin_pathrr�filepath�f�	firstline�es        rrUrU�s�����-�[�.�I�L����$�$�U�+�H��?�?����J�J�x�(���
	��(�(��2�H��h��$�
#���J�J�L�	��'�'��-�(�i�2G�"�N�
#���
#�
#��#�G�,�	�
�M�M�#�a�&�!���		�sH�A
C%�
B+�**B�B+�C%�B(	�$B+�+C"�:C�C%�C"�"C%c��t�dgzD]/}|j|k(s�|j|j�}|S|S)Nz.pyi)r�suffix�	with_name�stem)rr�s  r�remove_python_path_suffixr��sG���.�F�8�+����;�;�&� ��>�>�$�)�)�,�D���K�	��Krc�����t����jjd�ry�jdk(}|r�j���fd�}t	|��}|syt|d���d|fS)aK
    Returns the dotted path inside a sys.path as a list of names. e.g.

    >>> transform_path_to_dotted([str(Path("/foo").absolute())], Path('/foo/bar/baz.py').absolute())
    (('bar', 'baz'), False)

    Returns (None, False) if the path doesn't really resolve to anything.
    The second return part is if it is a package.
    r&)NF�__init__c3��K��D]�}t��j|�s�t��t|�d}|jtjj
�s|jd�r|dd}|s�w|j
tjj
�}t|�sytd�|D������y�w)N�/rc3�JK�|]}tjdd|����y�w)z-stubs$�N)�re�sub)�.0�ss  r�	<genexpr>zMtransform_path_to_dotted.<locals>.iter_potential_solutions.<locals>.<genexpr>s����I�a����z�2�q� 9�I�s�!#)	rer~r*rzr�sep�split�all�tuple)rD�restr�r�sys_paths   ��r�iter_potential_solutionsz:transform_path_to_dotted.<locals>.iter_potential_solutions�s�������	J�A��;��*�*�1�-��;�'��A���0���?�?�2�7�7�;�;�/�4�?�?�3�3G����8�D�� �J�J�r�w�w�{�{�3�E��u�:�� �I�5�I�I�I�%	J�s� C
�AC
�=A
C
c��t|�Sr)r*)rDs r�<lambda>z*transform_path_to_dotted.<locals>.<lambda>s
��S��V�r)�keyr)r�r$r~rr��sorted)r�r�
is_packager��potential_solutionss``   r�transform_path_to_dottedr��s~���,�K�8�K����"�"�3�'���!�!�Z�/�J��!�(�(��J�* � 8� :�;�����%�+;�<�Q�?��K�Kr) rzr��pathlibr�importlib.machineryr�jedi.inference.cacher�jedi.inference.base_valuer�jedi.inference.helpersrr�jedi.parser_utilsr	�jedi.file_ior
�jedirrrXrerr9rErRr]rVrsrUr�r��rr�<module>r�s���	�	��,�=�8�=�3����!#��.��.�('�V�2�b�)�"�*�"�J	!�<�,�D���D��:�5Lr

Youez - 2016 - github.com/yon3zu
LinuXploit