[TdZddlmZddlmZmZddlmZmZm Z ddl m Z e dZ e dd Z ee eegd fZGd dZGd d eZGddeZGddeZGddeZGddeZGddeZGddeZGddeZd S)zPMicro reports objects. A micro report is a tree of layout and content objects. ) annotations)IterableIterator)AnyCallableTypeVar) BaseWriter_T_VNodeTVNode)boundNc.eZdZddZddZdd ZddZdS)r returnNonechd|_g|_|jj|_dSN)parentchildren __class____name__lower visitor_nameselfs q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pylint/reporters/ureports/nodes.py__init__zVNode.__init__s/)- %' !%!8!>!>!@!@Iterator[VNode]c*t|jSr)iterrrs r__iter__zVNode.__iter__sDM"""rrr visitorr argsrkwargscJt|d|j}||g|Ri|S)Nvisit_getattrrrr"r#r$funcs racceptz VNode.acceptD,3 1d/11- - tD*4***6***rcJt|d|j}||g|Ri|S)Nleave_r'r)s rleavez VNode.leave%r,rN)rr)rr) rr r"r r#rr$rrr)r __module__ __qualname__rr!r+r/rrr r shAAAA ####++++ ++++++rcFeZdZdZddfd Zdd Zdd ZddZddZxZ S) BaseLayoutzlBase container node. attributes * children : components in this table (i.e. the table's cells) r2rIterable[Text | str]rrct|D]B}t|tr||-||CdSr)superr isinstancer appendadd_text)rrchildrs rrzBaseLayout.__init__3sn  % %E%'' % E"""" e$$$$  % %rr;r cx||vsJ|j|||_dS)zAdd a node to children.N)parentsrr9r)rr;s rr9zBaseLayout.append;s<DLLNN**** U### rindexintcJ|j||||_dS)zInsert a child node.N)rinsertr)rr>r;s rrAzBaseLayout.insertAs% UE*** rlist[BaseLayout]cn|j|usJ|jgS|jg|jzS)zReturn the ancestor nodes.)rr=rs rr=zBaseLayout.parentsFs?{$&&&& ; I }t{224444rtextstrcT|jt|dS)zShortcut to add text data.N)rr9Text)rrDs rr:zBaseLayout.add_textMs$ T$ZZ(((((rr2)rr5rr)r;r rr)r>r?r;r rr)rrB)rDrErr) rr0r1__doc__rr9rAr=r: __classcell__rs@rr4r4,s %%%%%%%  5555))))))))rr4c&eZdZdZd d fd ZxZS) rGzbA text portion. attributes : * data : the text value as an encoded or unicode string TdatarEescapedboolrrcdt||_||_dSr)r7rrNrM)rrMrNrs rrz Text.__init__\s+   r)T)rMrErNrOrrrr0r1rIrrJrKs@rrGrGUsL rrGceZdZdZdS) VerbatimTextzyA verbatim text, display the raw data. attributes : * data : the text value as an encoded or unicode string Nrr0r1rIr2rrrSrSbsrrSc,eZdZdZ d d fd ZxZS)SectionzA section. attributes : * BaseLayout attributes a title may also be given to the constructor, it'll be added as a first element a description may also be given to the constructor, it'll be added as a first paragraph Nr2title str | None descriptionrr5rrct||r1|dtt |g|r%|dt |fd|_dS)Nrr)r7rrA ParagraphrGTitle report_id)rrWrYrrs rrzSection.__init__ys (+++  ; KK9d;&7&7%899 : : :  5 KK55(333 4 4 4 r)NNr2)rWrXrYrXrr5rrrQrKs@rrVrVmsW  !"&)+ ! ! ! ! ! ! ! ! ! ! !rrVc"eZdZd d fd ZxZS) EvaluationSectionr2messagerErr5rrct|t}|t dt |z||t}|t |||dS)Nr[-)r7rr]r9rGlen)rrbrrW message_bodyrs rrzEvaluationSection.__init__s (+++  T#G ,--... E {{ DMM*** L!!!!!rrH)rbrErr5rr)rr0r1rrJrKs@rrarasB"""""""""""rraceZdZdZdS)r^ztA title. attributes : * BaseLayout attributes A title must not contain a section nor a paragraph! NrTr2rrr^r^rr^ceZdZdZdS)r]zzA simple text paragraph. attributes : * BaseLayout attributes A paragraph must not contains a section ! NrTr2rrr]r]rhrr]c.eZdZdZ ddfd ZxZS)Tablea#Some tabular data. attributes : * BaseLayout attributes * cols : the number of columns of the table (REQUIRED) * rheaders : the first row's elements are table's header * cheaders : the first col's elements are table's header * title : the table's optional title Nrr2colsr?rWrXrheaderscheadersrr5rrct|t|tsJ||_||_||_||_dS)Nr[)r7rr8r?rlrWrmrn)rrlrWrmrnrrs rrzTable.__init__sV (+++$$$$$$      r)Nrrr2) rlr?rWrXrmr?rnr?rr5rrrQrKs@rrkrksZ!)+ ! ! ! ! ! ! ! ! ! ! !rrk)rI __future__rcollections.abcrrtypingrrr%pylint.reporters.ureports.base_writerr r r VisitLeaveFunctionr r4rGrSrVrar^r]rkr2rrrus%  #"""""........))))))))))<<<<<< WT]] ')7 + + +r3nd23++++++++,#)#)#)#)#)#)#)#)R     5   4!!!!!j!!!4""""""""J !!!!!J!!!!!r