
    cj                       d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
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mZmZmZ ddlZddlmZ dd	lmZmZmZmZmZm Z m!Z! dd
l"m#Z#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l0m1Z1 ddl2m3Z3m4Z4 e	j5        dk    rddl6Z6nddl7Z6erddl8m9Z9 ede,f         Z: G d d          Z;dS )JArguments manager class used to handle command-line arguments and options.    )annotationsN)OrderedDict)Sequence)Path)TYPE_CHECKINGAnyTextIOUnion)utils)	_Argument_CallableArgument_ExtendArgument_StoreArgument_StoreNewNamesArgument_StoreOldNamesArgument_StoreTrueArgument)UnrecognizedArgumentAction_UnrecognizedOptionError)_HelpFormatter)Option)OptionParser)OptionsProviderMixIn)_convert_option_to_argument_parse_rich_type_value)MAIN_CHECKER_NAME)DirectoryNamespaceDict
OptionDict)      )_ArgumentsProviderr!   c                     e Zd ZdZ	 d_d`d
Zedad            Zej        dbd            Zedcd            Zej        ddd            ZdedZ	dfdZ
edgd            ZdhdZdid Z	 djdkd"Zdldmd$Z	 dndod)Zdpd.Zdqd4Zdrd6Z	 dsdtd<Zdhd=Z	 dudvdBZedwdF            ZdhdGZdxdJZdydMZ	 djdzdPZdjd{dSZd|dUZd}dVZd>dWd~dYZ 	 	 ddd^Z!dS )_ArgumentsManagerr   Nprogstrusage
str | NonedescriptionreturnNonec                   t          j                    | _        	 | j        | _        	 t          j        ||pd|t
          d          | _        	 i | _        	 i | _        	 i | _	        	 t          j                    5  t          j        dt                     |                     |pd           d d d            n# 1 swxY w Y   g | _        t!                      | _        i | _        i | _        i | _        d| _        d S )Nz%(prog)s [options]resolve)r$   r&   r(   formatter_classconflict_handlerignorecategory r   )argparse	Namespace_config_base_configArgumentParserr   _arg_parser_argument_groups_dict_option_dicts_directory_namespaceswarningscatch_warningsfilterwarningsDeprecationWarningreset_parsers_options_providersr   _all_options_short_options_nocallback_options	_mygroups	_maxlevel)selfr$   r&   r(   s       ?lib/python3.11/site-packages/pylint/config/arguments_manager.py__init__z_ArgumentsManager.__init__A   sJ     )++( L	 $2//#*&
 
 
 	0IK"446@=?"L $&& 	, 	,#H7IJJJJu{+++	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 9;>Imm.0>@ :<s   83B77B;>B;argparse.Namespacec                    | j         S )zNamespace for all options.r5   rG   s    rH   configz_ArgumentsManager.configq   s     |    valuec                    || _         d S NrL   rG   rP   s     rH   rN   z_ArgumentsManager.configv   s    rO   list[ConfigProvider]c                H    t          j        dt          d           | j        S )NzHoptions_providers has been deprecated. It will be removed in pylint 3.0.   
stacklevelr<   warnr?   rA   rM   s    rH   options_providersz#_ArgumentsManager.options_providersz   s1     	V	
 	
 	
 	

 &&rO   c                L    t          j        dt          d           || _        d S )NzPSetting options_providers has been deprecated. It will be removed in pylint 3.0.rV   rW   rY   rS   s     rH   r[   z#_ArgumentsManager.options_providers   s4    ^	
 	
 	
 	

 #(rO   providerr!   c                   |j         D ]\  }}|| j        |<   t          ||          }|j        p|j                                        }|j                            |d          }|j        t          k    r'|j	        r |j	        
                    d          d         }|                     |||           |                                  dS )z3Register an options provider and load its defaults.Nz

r   )optionsr:   r   sectionname
capitalizeoption_groups_descsgetr   __doc__split_add_arguments_to_parser_load_default_argument_values)rG   r]   optoptdictargumentr`   section_descs          rH   _register_options_providerz,_ArgumentsManager._register_options_provider   s    $, 	K 	KLC&-Ds#23@@H&D(-*B*B*D*DG#7;;GTJJL } 11 Ah6F A'/55f==a@))'<JJJJ**,,,,,rO   r`   rl   rk   r   c                    	 | j         |         }nS# t          $ rF |r| j                            ||          }n| j                            |          }|| j         |<   Y nw xY w|                     ||           dS )z6Add an argument to the correct argument section/group.titleN)r9   KeyErrorr8   add_argument_group_add_parser_option)rG   r`   rl   rk   section_groups        rH   rg   z*_ArgumentsManager._add_arguments_to_parser   s    		@ 6w?MM 	@ 	@ 	@ S $ 0 C C\! ! !% 0 C C' C R R2?D&w///	@ 	x88888s    AA A rt   argparse._ArgumentGroupc                R   t          |t                    r7 | j        |j        |j        |j        |j        |j        |j        |j	        d dS t          |t                    r | j        |j        i |j        |j        |j        |j        |j        |j        |j	        d |j        d         sJ |j        d         D ]?}|                     d| d|j        |j        t          j        |j        |j	                   @dS t          |t                    r@ | j        |j        i |j        |j        |j        |j        |j        |j        |j	        d dS t          |t                    r% | j        |j        |j        |j        |j        d dS t          |t                     r. | j        |j        i |j        |j        |j        |j        d dS t          |t"                    r= | j        |j        |j        |j        |j        |j        |j        |j	        |j        d dS t&          )	zAdd an argument.)actiondefaulttypehelpmetavarchoices	old_names--store)rw   rx   rz   )rw   rz   r{   )rw   rx   ry   rz   r{   r|   destN)
isinstancer   add_argumentflagsrw   rx   ry   rz   r{   r|   r   kwargsr3   SUPPRESSr   r   r   r   r   r   )rt   rk   old_names      rH   rs   z$_ArgumentsManager._add_parser_option   s   
 h// H	-&M& (]] ( (      "899 >	-&M&	/	   (]] ( (	 	 	 	 	 ?;////$OK8 	 	**#OO"$,!!*$,$, +    	 	 "899 &	-&M&	/	   (]] ( (	 	 	 	 	 	 	 "455 	-&M& (]	      "344 	-&M&/  ] (       /22 	-&M& (]] ( (]	 	 	 	 	 	 -,rO   c                P    | j                             g | j                  | _        dS )z3Loads the default values of all registered options.N)r8   
parse_argsrN   rM   s    rH   rh   z/_ArgumentsManager._load_default_argument_values   s"    &11"dkBBrO   	arguments	list[str]c                8   	 | j                             || j                  \  | _        }n$# t          $ r t	          j        d           Y nw xY wg }|D ]4}|                    d          r|                    |dd                    5|rt          |          dS )zEParse the arguments found in a configuration file into the namespace.    r~   rV   N)r_   )	r8   parse_known_argsrN   
SystemExitsysexit
startswithappendr   )rG   r   parsed_argsunrecognized_optionsri   s        rH   _parse_configuration_filez+_ArgumentsManager._parse_configuration_file  s    	'+'7'H'H4;( ($DK  	 	 	HRLLLLL	*, 	5 	5C~~d## 5$++CG444 	I*3GHHHH	I 	Is   (+ AASequence[str] | Nonec                    |t           j        dd         n|}| j                            || j                  \  | _        }|S )zAParse the arguments found on the command line into the namespace.N   )r   argvr8   r   rN   )rG   r   r   s      rH   !_parse_command_line_configurationz3_ArgumentsManager._parse_command_line_configuration  sJ     %.DCHQRRLL9	#'#3#D#Dt{$
 $
 [ rO   r2   c                   t          j        dt          d           t          j        d          | _        t          t          |          | _        | | j        _	        t          | j        j        j                  | _        dS )DEPRECATED.zyreset_parsers has been deprecated. Parsers should be instantiated once during initialization and do not need to be reset.rV   rW   )#;)inline_comment_prefixes)r&   N)r<   rZ   r?   configparserConfigParsercfgfile_parserr   r   cmdline_parseroptions_managersetoption_classATTRS_optik_option_attrs)rG   r&   s     rH   r@   z_ArgumentsManager.reset_parsers  s    F		
 	
 	
 	
 +7$.
 
 
 +6???.2+#&t':'G'M#N#N   rO   TConfigProvider	own_groupboolc                  	 t          j        dt          d           | j                            |           d |j        D             }t          |dd          }|r}|r{t          j                    5  t          j        dt                     | 	                    |j
                                        |j        ||           d	d	d	           n# 1 swxY w Y   nk|D ]h\  }}t          j                    5  t          j        dt                     |                     || j        ||           d	d	d	           n# 1 swxY w Y   i|D ]\  	}	                                		fd
|j        D             }t          j                    5  t          j        dt                     | 	                    	|||           d	d	d	           n# 1 swxY w Y   d	S )z)DEPRECATED: Register an options provider.zregister_options_provider has been deprecated. Options providers and arguments providers should be registered by initializing ArgumentsProvider. This automatically registers the provider on the ArgumentsManager.rV   rW   c                &    g | ]}d |d         v|S )groupr    ).0options     rH   
<listcomp>z?_ArgumentsManager.register_options_provider.<locals>.<listcomp>9  s6     "
 "
 "
WF1I5M"
"
 "
 "
rO   option_groupsr   r/   r0   Nc                x    g | ]6}|d                               dd                                          k    4|7S )r   r   r2   )rd   upper)r   r   gnames     rH   r   z?_ArgumentsManager.register_options_provider.<locals>.<listcomp>M  sR       !9=="--3355>  rO   )r<   rZ   r?   r[   r   r_   getattrr=   r>   add_option_groupra   r   re   add_optik_optionr   )
rG   r]   r   non_group_spec_optionsgroupsri   rj   gdocgoptionsr   s
            @rH   register_options_providerz+_ArgumentsManager.register_options_provider-  s    	Q 	
 	
 	
 	
 	%%h///"
 "
!)!1"
 "
 "
 ?B77 	W/ 	W(**  ';MNNNN%%M''))$*	                 !7 W WW,.. W W+H?QRRRR))(D4GgVVVW W W W W W W W W W W W W W W " 		G 		GKE4KKMME   &.  H
 (** G G';MNNNN%%eT8XFFFG G G G G G G G G G G G G G G		G 		Gs7   1ACCC39D88D<	?D<	4GG		G		
group_name_r_   list[tuple[str, OptionDict]]c                   t          j        dt          d           || j        v r| j        |         }nt	          j        | j        |                                          }| j                            |           || j        |<   |dk    r(|| j	        j
        vr| j	                            |           |D ]\  }}t          |                    dd          t                    sd|d<   t          j                    5  t          j        d	t          
           |                     ||||           ddd           n# 1 swxY w Y   dS )r   zadd_option_group has been deprecated. Option groups should be registered by initializing ArgumentsProvider. This automatically registers the group on the ArgumentsManager.rV   rW   ro   DEFAULTrw   r   callbackr/   r0   N)r<   rZ   r?   rE   optparseOptionGroupr   rb   r   r   	_sectionsadd_sectionr   rd   r%   r=   r>   r   )rG   r   r   r_   r]   r   ri   rj   s           rH   r   z"_ArgumentsManager.add_option_groupV  s    	N 	
 	
 	
 	
 ' 	<N:.EE(#:+@+@+B+B  E 00777).DN:& i'<d&9&CC< #//
;;;# 	E 	ELCgkk(G<<cBB /$.!(** E E';MNNNN%%hsGDDDE E E E E E E E E E E E E E E	E 	Es   ;4D;;D?	D?	optikcontainer,optparse.OptionParser | optparse.OptionGroupri   rj   r   c                n   t          j        dt          d           t          j                    5  t          j        dt                     |                     |||          \  }}ddd           n# 1 swxY w Y    |j        |i |}|| j        |<   t          | j	        |j
        pd          | _	        dS )r   zqadd_optik_option has been deprecated. Options should be automatically added by initializing an ArgumentsProvider.rV   rW   r/   r0   Nr   )r<   rZ   r?   r=   r>   optik_option
add_optionrB   maxrF   level)rG   r]   r   ri   rj   argsr   s          rH   r   z"_ArgumentsManager.add_optik_option|  s    	:		
 	
 	
 	
 $&& 	F 	F#H7IJJJJ --hWEEMD'	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F +*D<G<<!)#T^V\->Q??s   6A22A69A6tuple[list[str], OptionDict]c                .   t          j        dt          d           t          j        |          }d|v r|| j        |<   nd|d<   | j        |d<   d|v r6d|v r/|                    d          |d         d	vr|dxx         d
z  cc<   |d= dt          |          z   g}d|v r1|| j        |d         <   |	                    d|d         z              |d= t          |                                          D ] }|| j        vr|                    |           !||fS )zwDEPRECATED: Get our personal option definition and return a suitable form for
        use with optik/optparse.
        zoptik_option has been deprecated. Parsing of option dictionaries should be done automatically by initializing an ArgumentsProvider.rV   rW   rw   r   rx   rz   N)
store_truestore_falsez [current: %default]r~   short-)r<   rZ   r?   copyrD   cb_set_provider_optionrd   r%   rC   r   listkeysr   pop)rG   r]   ri   rj   r   keys         rH   r   z_ArgumentsManager.optik_option  su    	B		
 	
 	
 	
 )G$$w 	>14D$X.. *GH"&"=GJ  	#'!:KK	**: H%-JJ:
 #99	"s3xx g 	!47D 01KKgg../// '' 	! 	!C$22 !C   W}rO   r   streamTextIO | Noneskipsectionstuple[str, ...]c                   t          j        dt          d           i }g }t          | j        j        d           D ]}|j        }|sJ ||v rg }d |j        D             }t          |d           D ]}	d|	j        v r|	j        d	         dd
         }
	 | j	        |
         }n# t          $ r Y <w xY w|                    |
|t          | j        |
                    dd                    f           d |D             }|r|                    |           |||<   |pt          j        }d}|D ]}|rt#          d|           t          j                    5  t          j        dt                     t)          j        ||                                t          ||                              d
d
d
           n# 1 swxY w Y   d}d
S )zDEPRECATED: Write a configuration file according to the current configuration
        into the given stream or stdout.
        zFgenerate_config has been deprecated. It will be removed in pylint 3.0.rV   rW   c                &    | j         dk    | j         fS NMainro   xs    rH   <lambda>z3_ArgumentsManager.generate_config.<locals>.<lambda>      17f,ag6 rO   r   c                F    g | ]}t          |t          j                  |S r   r   r3   _SubParsersActionr   is     rH   r   z5_ArgumentsManager.generate_config.<locals>.<listcomp>  ;       !!X%?@@  rO   c                ,    | j         d         dd          S Nr   rV   option_stringsr   s    rH   r   z3_ArgumentsManager.generate_config.<locals>.<lambda>  s    A<LQ<OPQPRPR<S rO   z--helpr   Nr   r   c                J    g | ] \  }}}|                     d           |||f!S )
deprecated)rd   )r   ndvs       rH   r   z5_ArgumentsManager.generate_config.<locals>.<listcomp>  sE       "+1aaeeL>Q>Q1I  rO   F
filer/   r0   T)r<   rZ   r?   sortedr8   _action_groupsrp   _group_actionsr   r:   rq   r   r   rN   replacer   stdoutprintr=   r>   r   format_sectionr   )rG   r   r   options_by_sectionsectionsr   r   r_   option_actionsri   optnamerj   printedr`   s                 rH   generate_configz!_ArgumentsManager.generate_config  s    	T	
 	
 	
 	

  +66
 
 
 (	9 (	9E J\) G -  N
 n2S2STTT  s11 ,Q/3"09GG   H W__S#-F-FGG   /6    9
+++18":.%3: 	 	G )d(((((**  ';MNNNN$GMMOOV4Fw4O-P-P                
 GG	 	s%   B$$
B10B1AF::F>	F>	c                   t          j        dt          d           | j        D ]\}t          j                    5  t          j        dt                     |                                 ddd           n# 1 swxY w Y   ]dS )z:DEPRECATED: Initialize configuration using default values.zload_provider_defaults has been deprecated. Parsing of option defaults should be done automatically by initializing an ArgumentsProvider.rV   rW   r/   r0   N)r<   rZ   r?   r[   r=   r>   load_defaults)rG   r]   s     rH   load_provider_defaultsz(_ArgumentsManager.load_provider_defaults  s    B		
 	
 	
 	
 . 	) 	)H(** ) )';MNNNN&&((() ) ) ) ) ) ) ) ) ) ) ) ) ) )	) 	)s   0A55A9	<A9	Fconfig_filePath | Noneverbosec                   t          j        dt          d           |s|rt          dt          j                   dS t          t          j        	                    |                    
                                }|                                s t          dt          |           d          | j        }|j        d	k    r-	 |                     ||           n# t"          j        $ r Y nw xY wt'          |d
          5 }|                    |           ddd           n# 1 swxY w Y   t+          |j                                                  D ]c\  }}|                    d          r|t3          d          d         }|                                s|r||j        |                                <   d|r!t          d| dt          j                   dS dS )zDEPRECATED: Read the configuration file but do not load it (i.e. dispatching
        values to each option's provider).

        :raises OSError: When the specified config file doesn't exist
        zGread_config_file has been deprecated. It will be removed in pylint 3.0.rV   rW   z1No config file found, using default configurationr   NzThe config file z doesn't exist!z.toml	utf_8_sig)encodingzpylint.zUsing config file '')r<   rZ   r?   r  r   stderrr   ospath
expandvars
expanduserexistsOSErrorr%   r   suffix_parse_tomltomllibTOMLDecodeErroropen	read_filer   r   itemsr   lenisupperr   )rG   r  r  parserfpsectvaluess          rH   read_config_filez"_ArgumentsManager.read_config_file  sP    	U	
 	
 	
 	

  	 Gcj    F27--k::;;FFHH!!## 	PNS-=-=NNNOOO$( 	<  f5555*    kK888 %B  $$$% % % % % % % % % % % % % % % !%V%5%;%;%=%= > > < <f??9-- 2I 0 01D||~~ <& <5;F$TZZ\\2 	I6666SZHHHHHH	I 	Is$   C C,+C, D""D&)D&r   r#  configparser.ConfigParserc                *   t          | d          5 }t          j        |          }ddd           n# 1 swxY w Y   	 |d         d         }n# t          $ r Y dS w xY w|                                D ]\  }}|                                }t          |t                    s0|                                D ]d\  }}	t          |	t                    r
|	rdnd||<   $t          |	t                    rd
                    |	          ||<   Rt          |	          ||<   e|                                D ]`\  }}		 |                    |||		           # t          j        $ r0 |                    |           |                    |||		           Y ]w xY w dS )
zxDEPRECATED: Parse and handle errors of a toml configuration file.

        TODO: 3.0: Remove deprecated method.
        rb)modeNtoolpylintyesno,)rP   )r  r  loadrq   r   r   r   dictr   r   joinr%   r   r   NoSectionErrorr   )
r  r#  r$  contentsections_valuesr`   r&  section_namer   rP   s
             rH   r  z_ArgumentsManager._parse_toml1  s    +D))) 	'Rl2&&G	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	'	%foh7OO 	 	 	FF	.4466 	B 	BOGV"==??L fd++ !' 0 0eT** 0.3%=UUF6NNt,, 0%(XXe__F6NN%(ZZF6NN!' B BBJJ|V5JAAAA#2 B B B&&|444JJ|V5JAAAAABB	B 	Bs/   377A 
AA6E<FFc                   t          j        dt          d           | j        }|                                D ]P}|                    |          D ]8\  }}	 |                     ||           # t          t          j	        f$ r Y 5w xY wQdS )zqDEPRECATED: Dispatch values previously read from a configuration file to each
        option's provider.
        zGload_config_file has been deprecated. It will be removed in pylint 3.0.rV   rW   N)
r<   rZ   r?   r   r  r   global_set_optionrq   r   OptionError)rG   r#  r`   r   rP   s        rH   load_config_filez"_ArgumentsManager.load_config_fileS  s     	U	
 	
 	
 	

 $(( 	 	G!'g!6!6  **659999 ("67   H	 	s   A,,BBr   r	   c                    t          j        dt          d           t          j                    5  t          j        dt                     |                     |          cddd           S # 1 swxY w Y   dS )zADEPRECATED: Override configuration according to given parameters.zIload_configuration has been deprecated. It will be removed in pylint 3.0.rV   rW   r/   r0   N)r<   rZ   r?   r=   r>   load_configuration_from_config)rG   r   s     rH   load_configurationz$_ArgumentsManager.load_configurationd  s    W	
 	
 	
 	

 $&& 	? 	?#H7IJJJJ66v>>	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	?s   0A--A14A1rN   dict[str, Any]c                    t          j        dt          d           |                                D ]>\  }}|                    dd          }| j        |         }|                    ||           ?d S )NzaDEPRECATED: load_configuration_from_config has been deprecated. It will be removed in pylint 3.0.rV   rW   r   r   )r<   rZ   r?   r   r   rB   
set_option)rG   rN   ri   	opt_valuer]   s        rH   r=  z0_ArgumentsManager.load_configuration_from_configo  s     	o	
 	
 	
 	

 %llnn 	0 	0NC++c3''C(-HY////	0 	0rO   r   list[str] | Nonec                h   t          j        dt          d           |t          j        dd         nt          |          }| j                            |          \  }}| j        D ]J}|j	        }|j
                                        D ]'}t          ||d          }|t          |||           (K|S )zvDEPRECATED: Override configuration according to command line parameters.

        return additional arguments
        zVload_command_line_configuration has been deprecated. It will be removed in pylint 3.0.rV   rW   Nr   )r   )r<   rZ   r?   r   r   r   r   r   rD   rN   __dict__r   r   setattr)rG   r   r_   r]   rN   attrrP   s          rH   load_command_line_configurationz1_ArgumentsManager.load_command_line_configuration|  s     	d	
 	
 	
 	

  $;sx||d-88d8CC$0 	- 	-H_F,,.. - -t44 e,,,,	-
 rO   r   
int | Nonec                p    |t          j        dt          d           | j                                        S )z7Return the usage string based on the available options.NzeSupplying a 'level' argument to help() has been deprecated.You can call help() without any arguments.rV   rW   )r<   rZ   r?   r8   format_help)rG   r   s     rH   rz   z_ArgumentsManager.help  sE     	M="	    ++---rO   r   c                    t          j        dt          d           |                    d          r|dd         }n| j        |dd                  }|d}|                     ||           dS )z.DEPRECATED: Optik callback for option setting.zMcb_set_provider_option has been deprecated. It will be removed in pylint 3.0.rV   rW   r~   Nr   )r<   rZ   r?   r   rC   rA  )rG   r   ri   rP   r#  s        rH   r   z(_ArgumentsManager.cb_set_provider_option  s    
 	[	
 	
 	
 	

 >>$ 	/abb'CC %c!""g.C 	EU#####rO   c                j    t          j        dt          d           |                     ||           dS )z6DEPRECATED: Set option on the correct option provider.zglobal_set_option has been deprecated. You can use _arguments_manager.set_option or linter.set_option to set options on the global configuration object.rV   rW   N)r<   rZ   r?   rA  )rG   ri   rP   s      rH   r9  z#_ArgumentsManager.global_set_option  sE     	V		
 	
 	
 	
 	U#####rO   )minimalrN  c          	     $   t          j                    }t          j        d          }|                    t          j        ddg          |           t          | j        j        d           D ]}|j        dv r|j	        st          j                    }d |j	        D             }t          |d	           D ]e}|j
        d
         dd         }	 | j        |         }	n# t          $ r Y 3w xY w|	                    d          rM|so|	                    dd          }
t          |
t                    sJ t!          j        |
d          }|D ])}|                    t          j        |                     *t'          | j        |                    dd                    }|sT|sP|                    t          j        | d                     |                    t          j                               =d|	v r)t          |	d         t.                    sJ d|	d         v rjt          |t0          j                  r|j        }nHt          |t6          t8          f          r,t          |d
         t0          j                  rd |D             }|	                    d          dk    rd                    d |D                       }|r||	                    d          k    r)|                    ||           |                    t          j                               g|j        sJ |r-|                    |j                                        |           t          j        |          }tA          j!        |           t          |          S )z_Write a configuration file according to the current configuration into
        stdout.
        T)is_super_tabler,  r-  c                &    | j         dk    | j         fS r   ro   r   s    rH   r   z9_ArgumentsManager._generate_config_file.<locals>.<lambda>  r   rO   r   >   optional argumentsr_   Commandsc                F    g | ]}t          |t          j                  |S r   r   r   s     rH   r   z;_ArgumentsManager._generate_config_file.<locals>.<listcomp>  r   rO   c                ,    | j         d         dd          S r   r   r   s    rH   r   z9_ArgumentsManager._generate_config_file.<locals>.<lambda>  s    q?OPQ?RSTSUSU?V rO   r   rV   Nhide_from_config_filerz   r2   O   )widthr   r   z =r   	new_namesc                    g | ]	}|j         
S r   )patternr   s     rH   r   z;_ArgumentsManager._generate_config_file.<locals>.<listcomp>  s    6661QY666rO   ry   
py_version.c              3  4   K   | ]}t          |          V  d S rR   )r%   r   s     rH   	<genexpr>z:_ArgumentsManager._generate_config_file.<locals>.<genexpr>  s(      $;$;SVV$;$;$;$;$;$;rO   rx   )"tomlkitdocumenttableaddr   r   r8   r   rp   r   r   r:   rq   rd   r   r%   textwrapwrapcommentr   rN   r   nlr2  rePatternr[  r   tupler3  lowerdumpsr  loads)rG   rN  toml_docpylint_tool_tabler   group_tabler  rw   r  rj   help_msg	help_textlinerP   toml_strings                  rH   _generate_config_filez'_ArgumentsManager._generate_config_file  s    #%%#M>>>W[&(!3446GHHH+66
 
 
 L	H L	HE
 {KK  ' !-//K -  N
 !5V5VWWW 6. 6. /21226"09GG   H ;;677   ?&{{6266H%h44444 (hb A A AI ) ? ?#(=(=>>>>  W__S#-F-FGG  " 6#7(G(GHHH#
555 w& !%gh&7>>>>>"gh&77 !  eRZ00 7!MEEe}55 7*!Hbj; ; 7 76666E ;;v&&,6 <HH$;$;U$;$;$;;;E  uI(>(>>  ///
----; H!%%ek&7&7&9&9;GGGmH-- 	k""";s   C!!
C.-C.default_valuer  rw   None | str | OptionDictc                0   |dk    rt          j        dt          d           |dk    rt          j        dt          d           | j                            d|                    dd           t          |          g| j                  d	         | _        d
S )z&Set an option on the namespace object.rv  znThe 'action' argument has been deprecated. You can use set_option without the 'action' or 'optdict' arguments.rV   rW   zoThe 'optdict' argument has been deprecated. You can use set_option without the 'action' or 'optdict' arguments.r~   r   r   r   N)r<   rZ   r?   r8   r   r   r   rN   )rG   r  rP   rw   rj   s        rH   rA  z_ArgumentsManager.set_option  s     _$ 	M?"	    o% 	M?"	    &77-'//#s++--/Ee/L/LMK
 
 rO   )NN)r$   r%   r&   r'   r(   r'   r)   r*   )r)   rJ   )rP   rJ   r)   r*   )r)   rT   )rP   rT   r)   r*   )r]   r!   r)   r*   )r`   r%   rl   r'   rk   r   r)   r*   )rt   ru   rk   r   r)   r*   )r)   r*   )r   r   r)   r*   rR   )r   r   r)   r   )r2   )r&   r%   r)   r*   )T)r]   r   r   r   r)   r*   )
r   r%   r   r'   r_   r   r]   r   r)   r*   )
r]   r   r   r   ri   r%   rj   r   r)   r*   )r]   r   ri   r%   rj   r   r)   r   )Nr   )r   r   r   r   r)   r*   )NF)r  r  r  r   r)   r*   )r  r   r#  r(  r)   r*   )r   r	   r)   r*   )rN   r?  r)   r*   )r   rC  r)   r   )r   rI  r)   r%   )
r   r	   ri   r	   rP   r	   r#  r	   r)   r*   )ri   r%   rP   r	   r)   r*   )rN  r   r)   r%   )rv  rv  )
r  r%   rP   r	   rw   r'   rj   rw  r)   r*   )"__name__
__module____qualname__re   rI   propertyrN   setterr[   rm   rg   staticmethodrs   rh   r   r   r@   r   r   r   r   r  r  r'  r  r;  r>  r=  rH  rz   r   r9  ru  rA  r   rO   rH   r#   r#   >   sO       TT NR.  .  .  .  . `    X ]   ] ' ' ' X' ( ( ( (- - - -"9 9 9 9  L- L- L- \L-\C C C CI I I I  15
 
 
 
 
O O O O O$ ;?'G 'G 'G 'G 'GR$E $E $E $EL@ @ @ @*% % % %P MO@ @ @ @ @D) ) ) ) @E(I (I (I (I (IT B B B \BB   "	? 	? 	? 	?0 0 0 0 (,    .	. 	. 	. 	. 	.$ $ $ $*	$ 	$ 	$ 	$ 8= [  [  [  [  [  [ B -+:      rO   r#   )<re   
__future__r   r3   r   r   r   r  rh  r   rd  r<   collectionsr   collections.abcr   pathlibr   typingr   r	   r
   r   r`  r-  r   pylint.config.argumentr   r   r   r   r   r   r   pylint.config.exceptionsr   r   pylint.config.help_formatterr   pylint.config.optionr   pylint.config.option_parserr   $pylint.config.options_provider_mixinr   pylint.config.utilsr   r   pylint.constantsr   pylint.typingr   r   version_infor  tomli pylint.config.arguments_providerr!   r   r#   r   rO   rH   <module>r     s  
 Q P " " " " " "        				 				 



   # # # # # # $ $ $ $ $ $       4 4 4 4 4 4 4 4 4 4 4 4                                8 7 7 7 7 7 ' ' ' ' ' ' 4 4 4 4 4 4      T S S S S S S S . . . . . . < < < < < < < <w NNNN  DCCCCCC+-AABx x x x x x x x x xrO   