3x- : d Z ddlZddlZ G d d Zd ZdS )z Provide the Reporter class. Nc * e Zd ZdZd Zd Zd Zd ZdS )Reporterz: Formats the results of pyflakes checks to users. c " || _ || _ dS )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 warningStreamerrorStreams c/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyflakes/reporter.py__init__zReporter.__init__ s %" c F | j | d| d dS )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 filenamemsgs r unexpectedErrorzReporter.unexpectedError s1 h11#11122222r c j |d}n| d }t |d }|it j dk r'|%|t | t | z z dz }t |d }| j d||||fz n | j d|||fz |t| j | | j d |@| j t j dd |d|dz d z dS dS dS )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^ ) splitlinesmaxsysversion_infolenr r resub)r r r linenooffsettextlines r syntaxErrorzReporter.syntaxError' se <DD??$$R(D VQ&((T-=3t99s4yy#89A=^^FL/ (&> ? @ @ @ @ L}/FFGGGLt$$$Lt$$$!""26%d;FQJ;6G#H#H#($) * * * * * "!r c | j t | | j d dS )zp pyflakes found something wrong with the code. @param: A L{pyflakes.messages.Message}. r N)r r str)r messages r flakezReporter.flakeO s<