
    X-Ph[                         d Z ddlZddlmZmZ ddlmZ erddlmZ  G d de          Z	 G d d	e	          Z
d
 e
            iZdS )z>Defines the different custom formats in which mypy can output.    N)ABCabstractmethod)TYPE_CHECKING)	MypyErrorc                   2    e Zd ZdZedddefd            ZdS )ErrorFormatterzCBase class to define how errors are formatted before being printed.errorr   returnc                     t           )N)NotImplementedErrorselfr	   s     T/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mypy/error_formatter.pyreport_errorzErrorFormatter.report_error   s    !!    N)__name__
__module____qualname____doc__r   strr    r   r   r   r      sF        MM"+ "# " " " ^" " "r   r   c                   "    e Zd ZdZdddefdZdS )JSONFormatterz'Formatter for basic JSON output format.r	   r   r
   c           
          t          j        |j        |j        |j        |j        t          |j                  dk    rdnd                    |j                  |j	        dn|j	        j
        |j        d          S )z3Prints out the errors as simple, static JSON lines.r   N
)filelinecolumnmessagehintcodeseverity)jsondumps	file_pathr   r   r   lenhintsjoin	errorcoder!   r"   r   s     r   r   zJSONFormatter.report_error   su    z
, = #EK 0 0A 5 5499U[;Q;Q % 7U_=Q!N 

 

 
	
r   N)r   r   r   r   r   r   r   r   r   r   r      s<        11
+ 
# 
 
 
 
 
 
r   r   r#   )r   r#   abcr   r   typingr   mypy.errorsr   r   r   OUTPUT_CHOICESr   r   r   <module>r.      s    D D  # # # # # # # #             &%%%%%%" " " " "S " " "
 
 
 
 
N 
 
 
$ --//*r   