Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/jedi/inference/__pycache__/helpers.cpython-39.pyc
Ðазад
a j�h7 � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z dd� Z dd� Zd$d d�Zdd � Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� ZG dd� de�Zedd� �Zd%dd�Zd d!� Zd"d#� ZdS )&� N)�chain)�contextmanager)�treec C sJ | j }d|v sd|v rdS tj�tjdd�}tt�t� |�d t | ���S )Nz dist-packagesz site-packagesF�lib�pythonz\d.\d)�parts�os�path�join�sys�prefix�bool�re�match�escape�str)r r � base_path� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/jedi/inference/helpers.py�is_stdlib_path s r c C sZ t � | �}g }| jD ]:}t|tj�r6t � |�}||_nt|�}||_|�|� q||_|S )zO Much, much faster than copy.deepcopy, but just for parser tree nodes. )�copy�children� isinstancer ZLeaf�parent� deep_ast_copy�append)�objZnew_objZnew_children�child� new_childr r r r s r Fc C sN |j }|jdkr(ddlm} |�| j�S |jdksJ||jd |jd fvr�|dkrbddlm} |S |jdkrv| � |�S | � |�S |j }|j� |�}|r�|}n|d }|jd kr�|} | d 8 } |j| } | jdkr�q�q�|j| d |� }n|jd } |jd |� }| dk�r|d } |d d� }| � | �}dd lm} |D ]}| | ||�}�q6|S )a� Creates a "call" node that consist of all ``trailer`` and ``power`` objects. E.g. if you call it with ``append``:: list([]).append(3) or None You would get a node with the content ``list([]).append`` back. This generates a copy of the original ast node. If you're using the leaf, e.g. the bracket `)` it will return ``list([])``. We use this function for two purposes. Given an expression ``bar.foo``, we may want to - infer the type of ``foo`` to offer completions after foo - infer the type of ``bar`` to be able to jump to the definition of foo The option ``cut_own_trailer`` must be set to true for the second purpose. Zfstringr )�compiled�trailer����:)� NO_VALUESZatom� Z error_node�awaitN)� infer_trailer) r �typeZjedi.inferencer Zget_string_value_set�inference_stater Zjedi.inference.base_valuer# Z infer_node�indexZjedi.inference.syntax_treer&