bgdZddlmZddlmZmZddlmZddlm Z ddl m Z ddl m Z Gdd eZGd d eZGd d eZGdde ZGddeZdS)0Base class defining the interface for a printer.) annotations)ABCabstractmethod)Enum) NamedTuple)nodes)get_annotation_labelceZdZdZdZdZdS)NodeTypeclass interfacepackageN)__name__ __module__ __qualname__CLASS INTERFACEPACKAGEi/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pylint/pyreverse/printer.pyr r s EIGGGrr c"eZdZdZdZdZdZdZdS)EdgeTypeinherits implements association aggregationusesN)rrrINHERITS IMPLEMENTS ASSOCIATION AGGREGATIONUSESrrrrrs'HJKK DDDrrceZdZdZdZdZdZdS)LayoutLRRLTBBTN)rrr LEFT_TO_RIGHT RIGHT_TO_LEFT TOP_TO_BOTTOM BOTTOM_TO_TOPrrrr&r& s"MMMMMMrr&cReZdZUded<dZded<dZded<dZded <dZded <dS) NodePropertiesstrlabelNzlist[str] | Noneattrszlist[nodes.FunctionDef] | Nonemethods str | Nonecolor fontcolor)rrr__annotations__r3r4r6r7rrrr0r0's_JJJ"E"""".2G2222E I      rr0ceZdZdZ d&d'd Zd(d Zd(d Zed(dZd)d*dZ e d+d,dZ e d+d-dZ e d.d"Z d/d$Zed(d%ZdS)0PrinterrNtitler1layout Layout | Noneuse_automatic_namespace bool | NonereturnNonect||_||_||_g|_d|_|dS)N)r;r<r>lines_indent _open_graph)selfr;r<r>s r__init__zPrinter.__init__2s@    '>$ "   rc&|xjdz c_dS)zIncrement indentation.z NrErGs r _inc_indentzPrinter._inc_indent?s  rc.|jdd|_dS)zDecrement indentation.NrJrKs r _dec_indentzPrinter._dec_indentCs|CRC( rcdS)zfEmit the header lines, i.e. all boilerplate code that defines things like layout etc. NrrKs rrFzPrinter._open_graphGrTline force_newlinec|r|ds|dz }|j|j|zdS)N )endswithrDappendrE)rGrRrSs remitz Printer.emitMsI  t!4!4  DLD $,-.....rnametype_r propertiesNodeProperties | NonecdS)zVCreate a new node. Nodes can be classes, packages, participants etc. Nr)rGrYrZr[s r emit_nodezPrinter.emit_nodeRrQr from_nodeto_noderr2r5cdS)zACreate an edge from one node to another to display relationships.Nr)rGr_r`rZr2s r emit_edgezPrinter.emit_edge^rQrmethodnodes.FunctionDef list[str]cJ|jjgS|jdvrdnd}|jj|d}tt||jj|d}|D]*}d}|j|}|rt |}|||<+d|jDS)N>function staticmethodrrCc@g|]\}}|r |jd|n|jS)z: )rY).0arganns r z1Printer._get_method_arguments..xsJ   S%( :sx 3 ]   r)argstypedictziprgetr items)rc first_arg argumentsrrlannotation_labelrms r_get_method_argumentszPrinter._get_method_argumentshs ;  #I(DDDAA! ,2K,r?r@rA)r@rA)T)rRr1rSr?r@rA)N)rYr1rZr r[r\r@rA) r_r1r`r1rZrr2r5r@rA)rcrdr@re)ryr1r@rA)rrr__doc__rHrLrOrrFrXr^rbrhrxrr}rrrr:r:/sO:: !%/3     ))))   ^ /////  -1     ^   ! PPPP^P   \ (++++ AAA^AAArr:N)r __future__rabcrrenumrtypingrastroidr pylint.pyreverse.utilsr r rr&r0r:rrrrso 76""""""########777777t tT!!!!!Z!!!VAVAVAVAVAcVAVAVAVAVAr