Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pylint/checkers/base/__pycache__/basic_error_checker.cpython-39.pyc
Ðазад
a n�h W � @ s� d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlm Z ddl mZ ddlm Z dd lmZ d dhZed�Zd Zddd�dd�Zddd�dd�Zddd�dd�Zddd�dd�ZG dd � d e�ZdS )!z+Basic Error checker from the basic checker.� )�annotationsN)�nodes)�InferenceResult)�utils)� _BasicChecker)� infer_all)�HIGHz_py_abc.ABCMetazabc.ABCMeta)� __module__ztyping.ForwardRef�nodes.Breakznodes.For | nodes.While | None)� break_node�returnc C sF t jt jf}| j}t||�r,| t|dg �v rB|} |j}|du rqBq|S )z�Returns the loop node that holds the break node in arguments. Args: break_node (astroid.Break): the break node of interest. Returns: astroid.For or astroid.While: the loop node holding the break node. �orelseN)r �For�While�parent� isinstance�getattr)r � loop_nodesr � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pylint/checkers/base/basic_error_checker.py�_get_break_loop_node s �r �nodes.For | nodes.While�bool)�loopr c sV t jt jf}t jt jf}�fdd��j||d�D �� t� fdd��jt j|d�D ��S )z�Returns true if a loop may end with a break statement. Args: loop (astroid.For, astroid.While): the loop node inspected. Returns: bool: True if the loop may end with a break statement, False otherwise. c s g | ]}|� kr|�qS r r ��.0�_node)r r r � <listcomp>: s �z%_loop_exits_early.<locals>.<listcomp>�Z skip_klassc 3 s | ]}t |�� vr|V qd S �N)r r )�inner_loop_nodesr r � <genexpr>? s �z$_loop_exits_early.<locals>.<genexpr>)r r r �FunctionDef�ClassDef�nodes_of_class�any�Break)r r Zdefinition_nodesr )r r r �_loop_exits_early/ s ��r'