
    yIf%                       U d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlm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 dZdZ dddddddddfdddddd dd!d"fd#d$dd%d&dd'd(fd)d*dd+d,d-fd.d/dd0d&dd1d(fd2d3dd+d4d-fd5d6d+d7d8d9fd:d;d+d7d<d9fd=d>dd?d@dAdBfdCdDd+d7dEd9fdFd+d7dGdHfdIdJdKddLdMddNdO!                    e           dPdQfdRdRd+d7dSdTfdUdVddWdXd&dYdZfd[d\de d]dd^dZfd_dd`dae	j"        dbdcfdddeddfdgdhdifdjdedkdlddmdndofdpdqdrdsdtdufdvd+d7dwdHffZ#dxe$dy<    G dz d{ee          Z%e&d|k    r e%ej'        d}d                    dS dS )~z:Create UML diagrams for classes and modules in <packages>.    )annotationsN)Sequence)NoReturn)	constants)_ArgumentsManager)_ArgumentsProvider)discover_package_path)augmented_sys_path)writer)DiadefsHandler)Linkerproject_from_files)check_graphviz_availability!check_if_graphviz_supports_formatinsert_default_options)Options)dotpumlplantumlmmdhtml)	z#77AADDz#99DDFFz#44BB99z#BBCC33z#AAAA00z#EEDD88z#EE8866z#FFAABBz#DDDDDDzfilter-modefPUB_ONLYmodestringstorez<mode>a  filter attributes and functions according to
    <mode>. Correct modes are :
                            'PUB_ONLY' filter all non public attributes
                                [DEFAULT], equivalent to PRIVATE+SPECIAL_A
                            'ALL' no filter
                            'SPECIAL' filter Python special functions
                                except constructor
                            'OTHER' filter protected and private
                                attributes)shortdefaultdesttypeactionmetavarhelpclasscextendz<class>csvclasseszbcreate a class diagram with all classes related to <class>; this uses by default the options -ASmy)r   r!   r"   r    r   r   r#   zshow-ancestorsaz
<ancestor>intzAshow <ancestor> generations of ancestor classes not in <projects>)r   r!   r"   r    r   r#   zall-ancestorsA
store_truez0show all ancestors off all classes in <projects>)r   r   r!   r#   zshow-associatedsz<association_level>zGshow <association_level> levels of associated classes not in <projects>zall-associatedSz:show recursively all associated off all associated classeszshow-builtinbFz4include builtin objects in representation of classes)r   r!   r   r#   zshow-stdlibLz=include standard library objects in representation of classeszmodule-namesmynz<y or n>z0include module name in representation of classes)r   r   r    r"   r#   zonly-classnameskzMdon't show attributes and methods in the class boxes; this disables -f valueszno-standalonez only show nodes with connections)r!   r   r#   outputooutput_formatr   z<format>zOcreate a *.<format> output file if format is available. Available formats are: z, z{. Any other format will be tried to create by means of the 'dot' command line tool, which requires a graphviz installation.)r   r   r!   r   r"   r    r#   	colorizedzKUse colored output. Classes/modules of the same package get the same color.)r   r!   r   r#   zmax-color-depthmax_color_depth   z<depth>z2Use separate colors up to package depth of <depth>)r   r!   r   r"   r    r#   zcolor-palettecolor_palettez<color1,color2,...>z%Comma separated list of colors to useignorez<file[,file...]>ignore_listzIFiles or directories to be skipped. They should be base names, not paths.)r    r"   r   r   r#   project pz<project name>zset the project name.)r   r    r   r"   r#   zoutput-directorypathdz<output_directory>zset the output directory path.)r   r    r   r!   r"   r#   zsource-rootsglob_paths_csvz<path>[,<path>...] zAdd paths to the list of the source roots. Supports globbing patterns. The source root is an absolute path or a path relative to the current working directory used to determine a package namespace for modules located under the source root.)r    r"   r   r#   verbosezDMakes pyreverse more verbose/talkative. Mostly useful for debugging.r   OPTIONSc                  *    e Zd ZdZeZdZddZdd
ZdS )Runz=Base class providing common behaviour for pyreverse commands.	pyreverseargsSequence[str]returnr   c                *   d|v r<t          d           t          t          j                   t          j        d           t          j        | dt                     t          j        | |            t                       | 
                    |          }| j        j        t          vrDt                       t          d| j        j         d           t          | j        j                   t          j        |                     |                     d S )Nz	--versionz pyreverse is included in pylint:r   rH   )progdescriptionzFormat zO is not supported natively. Pyreverse will try to generate it using Graphviz...)printr   full_versionsysexitr   __init____doc__r   r   !_parse_command_line_configurationconfigr6   DIRECTLY_SUPPORTED_FORMATSr   r   run)selfrI   s     I/var/www/piapp/venv/lib/python3.11/site-packages/pylint/pyreverse/main.pyrS   zRun.__init__  s	   $4555)()))HQKKK"4kwOOOO#D$/// 	   55d;;;$,FFF')))G$+3 G G G   .dk.GHHH$         	list[str]r*   c                    |s#t                                                      dS t           fd|D                       }t          |          5  t	          | j        j         j        j         j        j                  }t          |d          }t           j                  }|                    ||          }ddd           n# 1 swxY w Y   t          j         j                                      |           dS )z#Checking arguments and run project.   c                D    h | ]}t          |j        j                  S rC   )r	   rV   source_roots).0argrY   s     rZ   	<setcomp>zRun.run.<locals>.<setcomp>1  s)    RRRc"3(@AARRRr[   )project_name
black_listrD   T)tagNr   )rO   r#   listr
   r   rV   r=   r<   rD   r   r   get_diadefsr   DiagramWriterwrite)rY   rI   extra_packages_pathsr=   linkerhandlerdiadefss   `      rZ   rX   zRun.run+  sB    	$))++1#RRRRTRRR 
  
   455 		; 		;(![0;2+	  G G...F$T[11G))'6::G		; 		; 		; 		; 		; 		; 		; 		; 		; 		; 		; 		; 		; 		; 		; 	T[))//888qs   A-C

CCN)rI   rJ   rK   r   )rI   r\   rK   r*   )	__name__
__module____qualname__rT   rE   optionsnamerS   rX   rC   r[   rZ   rG   rG     sL        GGGD! ! ! !0     r[   rG   __main__r^   )(rT   
__future__r   rQ   collections.abcr   typingr   pylintr   pylint.config.arguments_managerr    pylint.config.arguments_providerr   pylint.lintr	   pylint.lint.utilsr
   pylint.pyreverser   pylint.pyreverse.diadefslibr   pylint.pyreverse.inspectorr   r   pylint.pyreverse.utilsr   r   r   pylint.typingr   rW   DEFAULT_COLOR_PALETTEjoinDEFAULT_IGNORE_LISTrE   __annotations__rG   ro   argvrC   r[   rZ   <module>r      s  
 A @ @ " " " " " " 



 $ $ $ $ $ $             = = = = = = ? ? ? ? ? ? - - - - - - 0 0 0 0 0 0 # # # # # # 6 6 6 6 6 6 A A A A A A A A         
 " ! ! ! ! !   	!.	
 	
* 	 )		
 		
 	#W	
 	

 	"F		
 	
 	,]	
 	

 	"P		
 	
 	"J		
 	
 	"S		
 	
 	!F	
 	
	 	"c		
 	
 	"6	
 	
 	#!A $		*D E EA A A	
 	
$ 	"a		
 	
 	% H	
 	

 	#,,;	
 	

 	)! 4_	
 	
	 	'+	
 	
	 	+4	
 	

 	$+_		
 	

 	"Z	
 	
cY Y Y Y Yx1 1 1 1 1
/ 1 1 1h zC r[   