Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/astroid/__pycache__/arguments.cpython-39.pyc
Ðазад
a k�h�2 � @ sv d dl mZ d dlmZ d dlmZ d dlmZmZ d dl m Z mZ d dlm Z d dlmZmZmZ G dd � d �Zd S )� )�annotations)�nodes)�Instance)�CallContext�InferenceContext)�InferenceError� NoDefault)�InferenceResult)�Uninferable�UninferableBase� safe_inferc @ s� e Zd ZdZdddd�dd�Zeddd�d d ��Zdd� Zd d�dd�Zdddd�dd�Z d dd�dd�Z dddd�dd�ZdS )!�CallSitea� Class for understanding arguments passed into a call site. It needs a call context, which contains the arguments and the keyword arguments that were passed into a given call site. In order to infer what an argument represents, call :meth:`infer_argument` with the corresponding function node and the argument name. :param callcontext: An instance of :class:`astroid.context.CallContext`, that holds the arguments for the call site. :param argument_context_map: Additional contexts per node, passed in from :attr:`astroid.context.Context.extra_context` :param context: An instance of :class:`astroid.context.Context`. Nr zInferenceContext | None)�callcontext�contextc C sr |d u ri }|| _ |j}|j}t� | _| j||d�| _| j||d�| _dd� | jD �| _ dd� | j� � D �| _d S )N�r c S s g | ]}t |t�s|�qS � �� isinstancer ��.0�argr r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/astroid/arguments.py� <listcomp>/ s z%CallSite.__init__.<locals>.<listcomp>c S s i | ]\}}t |t�s||�qS r r �r �key�valuer r r � <dictcomp>2 s �z%CallSite.__init__.<locals>.<dictcomp>)�argument_context_map�args�keywords�set�duplicated_keywords�_unpack_args�_unpacked_args�_unpack_keywords�_unpacked_kwargs�positional_arguments�items�keyword_arguments)�selfr r r r r r r r �__init__ s ��zCallSite.__init__r c C s$ |pt � }t|j|j�}| ||d�S )zxGet a CallSite object from the given Call node. context will be used to force a single inference path. r )r r r r )�clsZ call_noder r r r r � from_call8 s zCallSite.from_callc C s t | j�t | j�kS )ao Check if in the current CallSite were passed *invalid* arguments. This can mean multiple things. For instance, if an unpacking of an invalid object was passed, then this method will return True. Other cases can be when the arguments can't be inferred by astroid, for example, by passing objects which aren't known statically. )�lenr&