관리-도구
편집 파일: message_state_handler.cpython-311.pyc
� �܋fLD � � � d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z m Z d dlmZm Z mZmZmZ d dlmZ d dlmZ d d lmZ d d lmZmZmZmZ ej dk rd dlmZ nd dlmZ erd d lm Z G d� d� � Z!dS )� )�annotationsN)�defaultdict)� TYPE_CHECKING)� exceptions� interfaces)�MSG_STATE_CONFIDENCE�MSG_STATE_SCOPE_CONFIG�MSG_STATE_SCOPE_MODULE� MSG_TYPES�MSG_TYPES_LONG)�HIGH)�MessageDefinition)�ManagedMessage)� OPTION_PO�InvalidPragmaError�UnRecognizedOptionError�parse_pragma)� � )�Literal)�PyLinterc � � e Zd ZdZd,d�Zd-d�Z d.d/d�Z d0d1d�Z d2d3d�Z d0d4d�Z d0d5d�Z d0d4d�Zd6d �Zd6d!�Z d7d8d%�Zd9d&�Z d7d:d(�Zd;d+�ZdS )<�_MessageStateHandlerz[Class that handles message disabling & enabling and processing of inline pragma's. �linterr �return�Nonec �� � || _ i | _ | j | j | j d�| _ | j d | j d d�| _ i | _ t t � � | _ d S )N)�enable�disable�disable-nextr r )zdisable-msgz enable-msg)r �_msgs_stater r �disable_next�_options_methods�_bw_options_methods�_pragma_linenor �list�_stashed_messages)�selfr s �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/lint/message_state_handler.py�__init__z_MessageStateHandler.__init__- s� � ����,.����k��|� �-�! � ! ��� �0��;��/��9�$ � $ �� � /1��� ���� �� � � �scope�str�msgr �line� int | Noner �boolc � � |dv rut |t � � sJ �| j j � ||||� � |s6|j dk r-| j � d||j |j f�� � dS dS dS | j }|||j <