Your IP : 216.73.217.32
B
A!p\2 � @ sl d Z ddlZddlZddlmZmZ ddlmZ ddlm Z m
Z
G dd� de�ZG dd � d e�Zd
d� Z
dS )zHCheck source code is ascii only or has an encoding declaration (PEP 263)� N)�IRawChecker�
ITokenChecker)�BaseChecker)�
OPTION_RGX�MessagesHandlerMixInc @ s, e Zd ZdZeZdZddiZdZdd� Z dS ) �ByIdManagedMessagesCheckerzIchecks for messages that are enabled or disabled by id instead of symbol.�
miscellaneousZI0023)z%szuse-symbolic-message-insteadz1Used when a message is enabled or disabled by id.� c C sh t �� }xR|D ]J\}}}}}||jkr|r:dj||d�}ndj||d�}| jd||d� qW t �� dS )zHinspect the source file to find messages activated or deactivated by id.z;Id '{ident}' is used to disable '{symbol}' message emission)�ident�symbolz:Id '{ident}' is used to enable '{symbol}' message emissionzuse-symbolic-message-instead)�line�argsN)r Zget_by_id_managed_msgs�name�format�add_messageZclear_by_id_managed_msgs) �self�moduleZmanaged_msgs�mod_nameZmsg_idZ
msg_symbol�linenoZis_disabled�txtr r �E/opt/alt/python37/lib/python3.7/site-packages/pylint/checkers/misc.py�process_module2 s
z)ByIdManagedMessagesChecker.process_moduleN)
�__name__�
__module__�__qualname__�__doc__r �__implements__r �msgs�optionsr r r r r r s r c sn e Zd ZdZeefZdZddddddifd �Zd
ddd
dd�ffZ � fdd�Z
dd� Zdd� Zdd� Z
� ZS )�EncodingCheckerzWchecks for:
* warning notes in the code like FIXME, XXX
* encoding issues.
r )z%s�fixmez5Used when a warning note as FIXME or XXX is detected.zACannot decode using encoding "%s", unexpected byte at position %dzinvalid-encoded-datazSUsed when a source line cannot be decoded using the specified source file encoding.Z
maxversion)� r )ZW0511ZW0512�notesZcsvz<comma separated values>)ZFIXMEZXXXZTODOzAList of note tags to take in consideration, separated by a comma.)�type�metavar�default�helpc s4 t � �� t�dd�ttj| jj�� tj �| _
d S )Nz
#\s*(%s)\b�|)�super�open�re�compile�join�map�escape�configr"