
    c                    p   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mZ ddlmZmZmZ ddlm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d.d$dd/d&fd0d1dd)d2d+fd3d4d)d5d6d7fd8d9dd:d;d<d=fd>d?d)d5d@d7fdAdBdCddDdEddFdG                    e           dHdIfdJdJd)d5dKdLfdMdNddOdPd$dQdRfdSddTdUe	j        dVdWfdXdYddZd[d\d]fd^dYd_d`ddadbdcffZ dde!de<    G df dgee          Z"e#dhk    r e"ej$        did                    dS dS )jz:Create UML diagrams for classes and modules in <packages>.    )annotationsN)Sequence)NoReturn)	constants)_ArgumentsManager)_ArgumentsProvider)fix_import_path)writer)DiadefsHandler)Linkerproject_from_files)check_graphviz_availability!check_if_graphviz_supports_formatinsert_default_options)Options)dotvcgpumlplantumlmmdhtmlz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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 values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#   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#   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   rC   )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configr5   DIRECTLY_SUPPORTED_FORMATSr   r   run)selfrD   s     5lib/python3.11/site-packages/pylint/pyreverse/main.pyrN   zRun.__init__   s   $ 	4555)()))HQKKK"4kwOOOO#D$/// 	   55d;;;$,FF 	I')))G$+3 G G G   .dk.GHHH$         	list[str]r*   c                   |s#t          |                                            dS t          |          5  t          || 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.   )project_name
black_listT)tagNr   )rJ   r#   r	   r   rQ   r;   r:   r   r   get_diadefsr
   DiagramWriterwrite)rT   rD   r;   linkerhandlerdiadefss         rU   rS   zRun.run   s    	$))++1T"" 	; 	;(![0;2  G
 G...F$T[11G))'6::G	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	T[))//888qs   A"B##B'*B'N)rD   rE   rF   r   )rD   rW   rF   r*   )	__name__
__module____qualname__rO   r@   optionsnamerN   rS    rV   rU   rB   rB      sL        GGGD! ! ! !0     rV   rB   __main__rY   )%rO   
__future__r   rL   collections.abcr   typingr   pylintr   pylint.config.arguments_managerr    pylint.config.arguments_providerr   pylint.lint.utilsr	   pylint.pyreverser
   pylint.pyreverse.diadefslibr   pylint.pyreverse.inspectorr   r   pylint.pyreverse.utilsr   r   r   pylint.typingr   rR   joinDEFAULT_IGNORE_LISTr@   __annotations__rB   rc   argvrh   rV   rU   <module>rz      s  
 A @ @ " " " " " " 



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