
    c                     :    d Z ddlZddlZ G d d          Zd ZdS )z
Provide the Reporter class.
    Nc                   *    e Zd ZdZd Zd Zd Zd ZdS )Reporterz:
    Formats the results of pyflakes checks to users.
    c                 "    || _         || _        dS )a  
        Construct a L{Reporter}.

        @param warningStream: A file-like object where warnings will be
            written to.  The stream's C{write} method must accept unicode.
            C{sys.stdout} is a good value.
        @param errorStream: A file-like object where error output will be
            written to.  The stream's C{write} method must accept unicode.
            C{sys.stderr} is a good value.
        N)_stdout_stderr)selfwarningStreamerrorStreams      1lib/python3.11/site-packages/pyflakes/reporter.py__init__zReporter.__init__   s     %"    c                 F    | j                             | d| d           dS )a  
        An unexpected error occurred trying to process C{filename}.

        @param filename: The path to a file that we could not process.
        @ptype filename: C{unicode}
        @param msg: A message explaining the problem.
        @ptype msg: C{unicode}
        z: 
N)r   write)r   filenamemsgs      r   unexpectedErrorzReporter.unexpectedError   s1     	h11#11122222r   c           
      j   |d}n|                                 d         }t          |d          }|it          j        dk     r'|%|t	          |          t	          |          z
  z
  dz   }t          |d          }| j                            d||||fz             n | j                            d|||fz             |t| j                            |           | j                            d           |@| j                            t          j        dd	|d|dz
                     d
z              dS dS dS )a0  
        There was a syntax error in C{filename}.

        @param filename: The path to the file with the syntax error.
        @ptype filename: C{unicode}
        @param msg: An explanation of the syntax error.
        @ptype msg: C{unicode}
        @param lineno: The line number where the syntax error occurred.
        @ptype lineno: C{int}
        @param offset: The column on which the syntax error occurred, or None.
        @ptype offset: C{int}
        @param text: The source code containing the syntax error.
        @ptype text: C{unicode}
        N   )      z%s:%d:%d: %s
z
%s:%d: %s
r   z\S z^
)	
splitlinesmaxsysversion_infolenr   r   resub)r   r   r   linenooffsettextlines          r   syntaxErrorzReporter.syntaxError'   sw     	)DD??$$R(D VQ 	H&( >T >3t99s4yy#89A=^^FL/ (&&#> ? @ @ @ @ L}&#/FFGGG 	*Lt$$$Lt$$$ *""26%d;FQJ;6G#H#H#($) * * * * *		* 	** *r   c                     | j                             t          |                     | j                             d           dS )zp
        pyflakes found something wrong with the code.

        @param: A L{pyflakes.messages.Message}.
        r   N)r   r   str)r   messages     r   flakezReporter.flakeO   s<     	3w<<(((4     r   N)__name__
__module____qualname____doc__r   r   r%   r)    r   r   r   r   	   s[         # # #	3 	3 	3&* &* &*P! ! ! ! !r   r   c                  J    t          t          j        t          j                  S )zI
    Make a reporter that can be used when no reporter is specified.
    )r   r   stdoutstderrr.   r   r   _makeDefaultReporterr2   Y   s     CJ
+++r   )r-   r   r   r   r2   r.   r   r   <module>r3      sm     
			 



M! M! M! M! M! M! M! M!`, , , , ,r   