Your IP : 216.73.216.213
B
A!p\ � @ s~ d Z ddlmZ ddlZddlZddlZddlZdddgZejdkrLdd � Z d
d� Z
G dd
� d
�ZG dd� de�Zdd� Z
dS )z+utilities methods and classes for reporters� )�print_functionN�=�-�+)� r c C s | |k| |k S )N� )�a�br r �J/opt/alt/python37/lib/python3.7/site-packages/pylint/reporters/__init__.py�cmp! s r c C s2 t | | �}dtt| |� |r&d| p(df }|S )zTgiven an old and new int value, return a string representing the
difference
z%s%sz%.2f� )�abs�CMPSr )�old�newZdiffZdiff_strr r r
�diff_string% s "r c @ sb e Zd ZdZdZddd�Zdd� Zddd �Zdd
d�Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dS )�BaseReporterzSbase class for reporters
symbols: show short symbolic names for messages.
r Nc C s6 d | _ d| _d | _d | _| �|� t�� tj | _d S )Nr ) �linter�section�outZout_encoding�
set_output�os�getcwd�sepZpath_strip_prefix)�self�outputr r r
�__init__6 s
zBaseReporter.__init__c C s dS )z3Handle a new message triggered on the current file.Nr )r �msgr r r
�handle_message? s zBaseReporter.handle_messagec C s |pt j| _dS )zset output streamN)�sys�stdoutr )r r r r r
r B s zBaseReporter.set_outputc C s t || jd� dS )z!write a line in the output buffer)�fileN)�printr )r �stringr r r
�writelnF s zBaseReporter.writelnc C s>