
    5 f                       d Z ddlmZ ddlmZmZ ddlmZmZm	Z	 ddl
mZ  e	d          Z e	dd	          Zeeeegd
f         Z G d d          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Zd
S )zPMicro reports objects.

A micro report is a tree of layout and content objects.
    )annotations)IterableIterator)AnyCallableTypeVar)
BaseWriter_T_VNodeTVNode)boundNc                  .    e Zd ZddZddZddZddZdS )r   returnNonec                h    d | _         g | _        | j        j                                        | _        d S N)parentchildren	__class____name__lowervisitor_nameselfs    U/var/www/equiseq/venv/lib/python3.11/site-packages/pylint/reporters/ureports/nodes.py__init__zVNode.__init__   s/    )-%'!%!8!>!>!@!@    Iterator[VNode]c                *    t          | j                  S r   )iterr   r   s    r   __iter__zVNode.__iter__   s    DM"""r   r   r   visitorr	   argsr   kwargsc                J    t          |d| j                   } || g|R i |S )Nvisit_getattrr   r   r"   r#   r$   funcs        r   acceptzVNode.accept   D    ,31d/11-
 -
 tD*4***6***r   c                J    t          |d| j                   } || g|R i |S )Nleave_r'   r)   s        r   leavezVNode.leave%   r,   r   N)r   r   )r   r   )
r   r   r"   r	   r#   r   r$   r   r   r   )r   
__module____qualname__r   r!   r+   r/    r   r   r   r      sh        A A A A
# # # #+ + + ++ + + + + +r   c                  F     e Zd ZdZdd fdZdd
ZddZddZddZ xZ	S )
BaseLayoutzlBase container node.

    attributes
    * children : components in this table (i.e. the table's cells)
    r2   r   Iterable[Text | str]r   r   c                    t                                                       |D ]B}t          |t                    r|                     |           -|                     |           Cd S r   )superr   
isinstancer   appendadd_text)r   r   childr   s      r   r   zBaseLayout.__init__3   sn     	% 	%E%'' %E""""e$$$$		% 	%r   r;   r   c                x    ||                                  vsJ | j                            |           | |_        dS )zAdd a node to children.N)parentsr   r9   r   )r   r;   s     r   r9   zBaseLayout.append;   s<    DLLNN****U###r   indexintc                J    | j                             ||           | |_        dS )zInsert a child node.N)r   insertr   )r   r>   r;   s      r   rA   zBaseLayout.insertA   s%    UE***r   list[BaseLayout]c                l    | j         | usJ | j         g S | j         g| j                                         S )zReturn the ancestor nodes.)r   r=   r   s    r   r=   zBaseLayout.parentsF   s@    {$&&&&;I4dk113344r   textstrc                T    | j                             t          |                     dS )zShortcut to add text data.N)r   r9   Text)r   rD   s     r   r:   zBaseLayout.add_textM   s$    T$ZZ(((((r   r2   )r   r5   r   r   )r;   r   r   r   )r>   r?   r;   r   r   r   )r   rB   )rD   rE   r   r   )
r   r0   r1   __doc__r   r9   rA   r=   r:   __classcell__r   s   @r   r4   r4   ,   s         % % % % % % %      
5 5 5 5) ) ) ) ) ) ) )r   r4   c                  &     e Zd ZdZd
d fd	Z xZS )rG   zbA text portion.

    attributes :
    * data : the text value as an encoded or unicode string
    TdatarE   escapedboolr   r   c                d    t                                                       || _        || _        d S r   )r7   r   rN   rM   )r   rM   rN   r   s      r   r   zText.__init__\   s+    			r   )T)rM   rE   rN   rO   r   r   r   r0   r1   rI   r   rJ   rK   s   @r   rG   rG   U   sL                   r   rG   c                      e Zd ZdZdS )VerbatimTextzyA verbatim text, display the raw data.

    attributes :
    * data : the text value as an encoded or unicode string
    Nr   r0   r1   rI   r2   r   r   rS   rS   b   s           r   rS   c                  ,     e Zd ZdZ	 	 	 dd fdZ xZS )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
    Nr2   title
str | Nonedescriptionr   r5   r   r   c                   t                                          |           |r1|                     dt          t	          |          g                     |r%|                     dt          |f                     d| _        d S )Nr   r    )r7   r   rA   	ParagraphrG   Title	report_id)r   rW   rY   r   r   s       r   r   zSection.__init__y   s     	(+++ 	;KK9d;&7&7%899::: 	5KK55(333444 r   )NNr2   )rW   rX   rY   rX   r   r5   r   r   rQ   rK   s   @r   rV   rV   m   sW        	 	 !"&)+	! ! ! ! ! ! ! ! ! ! !r   rV   c                  "     e Zd Zd	d
 fdZ xZS )EvaluationSectionr2   messagerE   r   r5   r   r   c                   t                                          |           t                      }|                    t	          dt          |          z                       |                     |           t                      }|                    t	          |                     |                     |           d S )Nr[   -)r7   r   r]   r9   rG   len)r   rb   r   rW   message_bodyr   s        r   r   zEvaluationSection.__init__   s    (+++T#G,--...E {{DMM***L!!!!!r   rH   )rb   rE   r   r5   r   r   )r   r0   r1   r   rJ   rK   s   @r   ra   ra      sB        " " " " " " " " " " "r   ra   c                      e Zd ZdZdS )r^   ztA title.

    attributes :
    * BaseLayout attributes

    A title must not contain a section nor a paragraph!
    NrT   r2   r   r   r^   r^                 r   r^   c                      e Zd ZdZdS )r]   zzA simple text paragraph.

    attributes :
    * BaseLayout attributes

    A paragraph must not contains a section !
    NrT   r2   r   r   r]   r]      rh   r   r]   c                  .     e Zd ZdZ	 	 	 	 dd fdZ xZS )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
    Nr   r2   colsr?   rW   rX   rheaderscheadersr   r5   r   r   c                    t                                          |           t          |t                    sJ || _        || _        || _        || _        d S )Nr[   )r7   r   r8   r?   rl   rW   rm   rn   )r   rl   rW   rm   rn   r   r   s         r   r   zTable.__init__   sV     	(+++$$$$$$	
  r   )Nr   r   r2   )rl   r?   rW   rX   rm   r?   rn   r?   r   r5   r   r   rQ   rK   s   @r   rk   rk      sZ          !)+! ! ! ! ! ! ! ! ! ! !r   rk   )rI   
__future__r   collections.abcr   r   typingr   r   r   %pylint.reporters.ureports.base_writerr	   r
   r   VisitLeaveFunctionr   r4   rG   rS   rV   ra   r^   r]   rk   r2   r   r   <module>ru      s%  
 
 # " " " " " . . . . . . . . ) ) ) ) ) ) ) ) ) ) < < < < < <WT]]
')7
+
+
+r3nd23 + + + + + + + +,#) #) #) #) #) #) #) #)R
 
 
 
 
5 
 
 
    4   ! ! ! ! !j ! ! !4" " " " " " " "    J       
   ! ! ! ! !J ! ! ! ! !r   