Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pylint/checkers/__pycache__/ellipsis_checker.cpython-39.pyc
Ðазад
a n�h� � @ st d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z erPddlmZ G dd � d e�Z d dd�d d�ZdS )z!Ellipsis checker for Python code.� )�annotations)� TYPE_CHECKING)�nodes)�BaseChecker)�only_required_for_messages)�PyLinterc @ s0 e Zd ZdZddiZed�ddd�dd ��Zd S )�EllipsisCheckerZunnecessary_ellipsisZW2301)zUnnecessary ellipsis constant�unnecessary-ellipsisz�Used when the ellipsis constant is encountered and can be avoided. A line of code consisting of an ellipsis is unnecessary if there is a docstring on the preceding line or if there is a statement in the same scope.r znodes.Const�None)�node�returnc C s^ |� � dkrZt|jtj�rZt|jjtjtjf�r:|jjjsLt|jjj �dkrZ| j d|d� dS )a_ Check if the ellipsis constant is used unnecessarily. Emits a warning when: - A line consisting of an ellipsis is preceded by a docstring. - A statement exists in the same scope as the ellipsis. For example: A function consisting of an ellipsis followed by a return statement on the next line. zbuiltins.Ellipsis� r )r N)Zpytype� isinstance�parentr �Expr�ClassDef�FunctionDefZdoc_node�len�bodyZadd_message)�selfr � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pylint/checkers/ellipsis_checker.py�visit_const! s �����zEllipsisChecker.visit_constN)�__name__� __module__�__qualname__�nameZmsgsr r r r r r r s �r r r )�linterr c C s | � t| �� d S )N)Zregister_checkerr )r r r r �register9 s r N)�__doc__� __future__r �typingr Zastroidr Zpylint.checkersr Zpylint.checkers.utilsr Zpylint.lintr r r r r r r �<module> s %
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка