o
    ga                     @   sn   d Z ddlZddlmZmZ ddlmZ ddlmZ er(ddl	m
Z
 ddlmZ G dd	 d	eZdddZdS )zJSON reporter    N)TYPE_CHECKINGOptional)	IReporter)BaseReporter)PyLinter)Sectionc                   @   sF   e Zd ZdZeZdZdZded ddfddZ	dd	d
Z
dddZdS )JSONReporterz$Report messages and layouts in JSON.jsonlayoutr   returnNc                 C   s,   dd | j D }ttj|dd| jd dS )zLaunch layouts displayc                 S   s:   g | ]}|j |j|j|j|j|j|j|jpd |jd	qS ) )	typemoduleobjlinecolumnpathsymbolmessagez
message-id)	categoryr   r   r   r   r   r   msgmsg_id).0r    r   \/home/ubuntu/cloudmapper/venv/lib/python3.10/site-packages/pylint/reporters/json_reporter.py
<listcomp>#   s    z1JSONReporter.display_messages.<locals>.<listcomp>   )indent)fileN)messagesprintr	   dumpsout)selfr
   json_dumpabler   r   r   display_messages!   s   zJSONReporter.display_messagesc                 C      dS )z#Don't do anything in this reporter.Nr   r#   r
   r   r   r   display_reports3       zJSONReporter.display_reportsc                 C   r&   )zDo nothing.Nr   r'   r   r   r   _display6   r)   zJSONReporter._display)r
   r   r   N)__name__
__module____qualname____doc__r   __implements__name	extensionr   r%   r(   r*   r   r   r   r   r      s    
r   linterr   r   c                 C   s   |  t dS )z.Register the reporter classes with the linter.N)register_reporterr   )r2   r   r   r   register:   s   r4   )r2   r   r   N)r.   r	   typingr   r   pylint.interfacesr   pylint.reporters.base_reporterr   pylint.lint.pylinterr   pylint.reporters.ureports.nodesr   r   r4   r   r   r   r   <module>   s    