
    c                        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 erd d	lmZ 	 	 	 dddZdS )    )annotationsN)Path)TYPE_CHECKING)	reporters)_ConfigurationFileParser)_UnrecognizedOptionError)utils)PyLinterFlinterr
   	args_list	list[str]reporter7reporters.BaseReporter | reporters.MultiReporter | Noneconfig_fileNone | str | Pathverbose_modeboolreturnc                   |rt          |          nd}|                     |rt          |          nd           t          ||           }	 |                    |          \  }}nF# t
          $ r9}t          |t          j                   t          j	        d           Y d}~nd}~ww xY wd|v r't          t          j        |d                              d|v r-|                     t          j        |d                              d}		 |                     |           n1# t           $ r$}
d                    |
j                  }	Y d}
~
nd}
~
ww xY w|r|                     |           |                     d	           |                     |          }	 |                    d
           n# t,          $ r Y nw xY wg }|D ]g}|                    d
          r|                    |dd                    5|                    d          r|                    |dd                    h|rXd                    |          }	 | j                            d|            n$# t6          $ r t          j	        d           Y nw xY w|	>|                     |rt          |          nd           |                     d|	d           |                                  |                     d           |                                  |                                  |                                   | j!        i f| j"        t          d          #                                <   |S )zoParse all available options, read config files and command line arguments and
    set options accordingly.
    N )	file_path)file    z	init-hookzload-pluginsz, zCommand linez--   -   zUnrecognized option found: zunrecognized-optionr   )argslinez"Command line or configuration file.)$r   set_current_modulestrr   parse_config_fileOSErrorprintsysstderrexitexecr	   _unquoteload_plugin_modules_splitstrip_parse_configuration_filer   joinoptionsset_reporter!_parse_command_line_configurationremove
ValueError
startswithappend_arg_parsererror
SystemExitadd_message_emit_stashed_messagesload_plugin_configurationenable_fail_on_messages_parse_error_modeconfig_directory_namespacesresolve)r   r   r   r   r   config_file_parserconfig_dataconfig_argsexunrecognized_options_messageexcparsed_args_listunrecognized_optionsoptmsgs                  Clib/python3.11/site-packages/pylint/config/config_initialization.py_config_initializationrK      s    (3<${###K +Ec+...2FFF 2,GG#5#G#G! $H $
 $
 [[    bsz""""
 k! 7U^K455666 $ S""5#4[5P#Q#QRRR#' >((5555# > > >'+yy'='=$$$$$$>  &H%%% n--- ??	JJ%%%%    ') 1 1>>$ 	1 ''ABB0000^^C   	1 ''ABB000 ii,--	$$%H3%H%HIIII 	 	 	HRLLLLL	
 $ 
!!k"I#k"2"2"2rJJJ!(D1 	 	
 	
 	
 !!### BCCC $$&&& ""$$$
 :@8KF c!2!2!4!45 sT   A% %
B(//B##B(
D   
E*E		EF) )
F65F6=I I<;I<)NNF)r   r
   r   r   r   r   r   r   r   r   r   r   )
__future__r   r%   pathlibr   typingr   pylintr    pylint.config.config_file_parserr   pylint.config.exceptionsr   pylint.utilsr	   pylint.lintr
   rK        rJ   <module>rV      s   
 # " " " " " 



                         E E E E E E = = = = = =       %$$$$$$ IM%)g g g g g g grU   