Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/astroid/brain/__pycache__/brain_numpy_utils.cpython-39.pyc
Ðазад
a k�h� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m Z dZdd�d d �Zdd�dd �Z ddd�dd�Zddd�dd�Zdddd�dd�Zdddd�dd�ZdS )z)Different utilities for the numpy brains.� )�annotations)�extract_node)�InferenceContext)� Attribute�Import�Name)�1Z20�0�bool)�returnc C s t � } | o| tkS )z*Returns True if numpy supports type hints.)�_get_numpy_version� NUMPY_VERSION_TYPE_HINTS_SUPPORT)Znp_ver� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/astroid/brain/brain_numpy_utils.py�numpy_supports_type_hints s r ztuple[str, str, str]c C s: zddl } t| jj�d��W S ttfy4 Y dS 0 dS )zj Return the numpy version number if numpy can be imported. Otherwise returns ('0', '0', '0') r N�.)r r r )�numpy�tuple�version�split�ImportError�AttributeError)r r r r r s r NzInferenceContext | None��contextc C s t | �}|j|d�S )Nr )r Zinfer)�src�noder r r r �infer_numpy_member% s r r )r r c s4 | j � dd� | �� �d D �}t� fdd�|D ��S )a> Returns True if the node is a representation of a numpy module. For example in : import numpy as np x = np.linspace(1, 2) The node <Name.np> is a representation of the numpy module. :param node: node to test :return: True if the node is a representation of the numpy module. c S s g | ]}t |t�r|�qS r )� isinstancer )�.0�xr r r � <listcomp>7 s z&_is_a_numpy_module.<locals>.<listcomp>� c 3 s&