bg ddlmZddlZddlZddlZddlmZmZddlmZddl m Z ddl m Z ddl mZer ddlmZdd l mZGd d ZdS) ) annotationsN) TYPE_CHECKINGTextIO)warn)Message)Text) LinterStats)PyLinter)SectioncjeZdZdZdZdZ d d!d Zd"d Zd d!d Zd#d$dZ d%dZ d%dZ d&dZ d'dZ d(dZdS)) BaseReporterzTBase class for reporters. symbols: show short symbolic names for messages. baseNoutput TextIO | NonereturnNonect|ddrtjdtd|d|_|p t j|_g|_tj tj z|_ dS)N__implements__zUsing the __implements__ inheritance pattern for BaseReporter is no longer supported. Child classes should only inherit BaseReporter stacklevelr) getattrwarningsrDeprecationWarningsectionsysstdoutoutmessagesosgetcwdseppath_strip_prefixselfrs o/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pylint/reporters/base_reporter.py__init__zBaseReporter.__init__!s{ 4)4 0 0  MS"       !/SZ') !#rv!5msgrc:|j|dS)z3Handle a new message triggered on the current file.N)r append)r&r*s r'handle_messagezBaseReporter.handle_message0s S!!!!!r)cZtdtd|p tj|_dS)zSet output stream.zO'set_output' will be removed in 3.0, please use 'reporter.out = stream' insteadrrN)rrrrrr%s r' set_outputzBaseReporter.set_output4s8 ]     'SZr)stringstrc2t||jdS)z"Write a line in the output buffer.)fileN)printr)r&r0s r'writelnzBaseReporter.writeln>s f48$$$$$$r)layoutr cFd|_|jr}t|jdjdtr0|jdjdxjd|jdz c_n"t d|jdj||dS)z0Display results encapsulated in the layout tree.rz ()zIncorrect child for N)r report_id isinstancechildrenrdata ValueError_displayr&r6s r'display_reportszBaseReporter.display_reportsBs   W&/!,5a8$?? W"+A.337OFzBaseReporter._displayLs!###r)Section | NonecdS)aHook for displaying the messages of the reporter. This will be called whenever the underlying messages needs to be displayed. For some reporters, it probably doesn't make sense to display messages as soon as they are available, so some mechanism of storing them could be used. This method can be implemented to display them after they've been aggregated. Nr?s r'display_messageszBaseReporter.display_messagesPr)modulefilepath str | NonecdS)z0Hook called when a module starts to be analysed.NrE)r&rHrIs r'on_set_current_modulez"BaseReporter.on_set_current_module]rGr)statsr previous_statsLinterStats | NonecdS)z-Hook called when a module finished analyzing.NrE)r&rMrNs r'on_closezBaseReporter.on_close`rGr))N)rrrr)r*rrr)r)r0r1rr)r6r rr)r6rCrr)rHr1rIrJrr)rMr rNrOrr)__name__ __module__ __qualname____doc__ extensionnamer(r-r/r5r@r>rFrLrQrEr)r'r r s I D 6 6 6 6 6""""(((((%%%%%$$$$     ????<<<<<r^s #""""" ((((((((""""""000000$$$$$$8------777777O<O<O<O<O<O<O<O<O<O