o
    2g                     @  s2   d dl mZ d dlZd dlmZ G dd dZdS )    )annotationsN)Optionsc                   @  sH   e Zd ZdddZdddZdddZdddZdddZdddZdS )Errorsoptionsr   returnNonec                 C  s"   d| _ d| _tjj|dd| _d S )Nr   T)hide_error_codes)
num_errorsnum_warningsmypyerrorsr   _errors)selfr    r   D/home/garg/my-data/venv/lib/python3.10/site-packages/mypyc/errors.py__init__   s   zErrors.__init__msgstrpathlineintc                 C  (   | j j|d |d|d |  jd7  _d S )Nerrorseverityfile   )r   reportr	   r   r   r   r   r   r   r   r         zErrors.errorc                 C  s   | j j|d |d|d d S )Nnoter   )r   r   r   r   r   r   r       s   zErrors.notec                 C  r   )Nwarningr   r   )r   r   r
   r   r   r   r   r!      r   zErrors.warning	list[str]c                 C  s
   | j  S N)r   new_messages)r   r   r   r   r$      s   
zErrors.new_messagesc                 C  s   |   D ]}t| qd S r#   )r$   print)r   r   r   r   r   flush_errors   s   
zErrors.flush_errorsN)r   r   r   r   )r   r   r   r   r   r   r   r   )r   r"   )r   r   )	__name__
__module____qualname__r   r   r    r!   r$   r&   r   r   r   r   r      s    




r   )
__future__r   mypy.errorsr   mypy.optionsr   r   r   r   r   r   <module>   s    