Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pylint/reporters/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pylint/reporters/__pycache__/__init__.cpython-37.pyc

B

A!p\�@s~dZddlmZddlZddlZddlZddlZdddgZejdkrLdd	�Z	d
d�Z
Gdd
�d
�ZGdd�de�Zdd�Z
dS)z+utilities methods and classes for reporters�)�print_functionN�=�-�+)�rcCs||k||kS)N�)�a�brr�J/opt/alt/python37/lib/python3.7/site-packages/pylint/reporters/__init__.py�cmp!srcCs2t||�}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_strrrr
�diff_string%s"rc@sbeZdZdZdZddd�Zdd�Zddd	�Zdd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�BaseReporterzSbase class for reporters

    symbols: show short symbolic names for messages.
    rNcCs6d|_d|_d|_d|_|�|�t��tj|_dS)Nr)	�linter�section�outZout_encoding�
set_output�os�getcwd�sepZpath_strip_prefix)�self�outputrrr
�__init__6s
zBaseReporter.__init__cCsdS)z3Handle a new message triggered on the current file.Nr)r�msgrrr
�handle_message?szBaseReporter.handle_messagecCs|ptj|_dS)zset output streamN)�sys�stdoutr)rrrrr
rBszBaseReporter.set_outputcCst||jd�dS)z!write a line in the output buffer)�fileN)�printr)r�stringrrr
�writelnFszBaseReporter.writelncCs>d|_t|d�r0|jdjdjd|j7_|�|�dS)z/display results encapsulated in the layout treer�	report_idz (%s)N)r�hasattr�children�datar%�_display)r�layoutrrr
�display_reportsJs
 zBaseReporter.display_reportscCs
t��dS)zdisplay the layoutN)�NotImplementedError)rr*rrr
r)QszBaseReporter._displaycCsdS)a�Hook for displaying the messages of the reporter

        This will be called whenever the underlying messages
        needs to be displayed. For some reporters, it probably
        doesn't make sense to display messages as soon as they
        are available, so some mechanism of storing them could be used.
        This method can be implemented to display them after they've
        been aggregated.
        Nr)rr*rrr
�display_messagesUs	zBaseReporter.display_messagescCsdS)z0Hook called when a module starts to be analysed.Nr)r�module�filepathrrr
�on_set_current_modulebsz"BaseReporter.on_set_current_modulecCsdS)z-Hook called when a module finished analyzing.Nr)r�statsZprevious_statsrrr
�on_closeeszBaseReporter.on_close)N)N)r)�__name__�
__module__�__qualname__�__doc__�	extensionrrrr$r+r)r-r0r2rrrr
r.s
	


rc@s(eZdZdZdZdd�Zdd�ZdZdS)�CollectingReporterzcollects messagesZ	collectorcCst�|�g|_dS)N)rr�messages)rrrr
rns
zCollectingReporter.__init__cCs|j�|�dS)N)r9�append)rrrrr
rrsz!CollectingReporter.handle_messageN)r3r4r5r6�namerrr)rrrr
r8is
r8cCs ddlm}|�|td�dS)z1initialize linter with reporters in this package r)�utilsN)�pylintr<Zregister_plugins�__path__)rr<rrr
�
initializexsr?)r6�
__future__rr�localer�warningsr�version_inforrrr8r?rrrr
�<module>s

	;