
    \Og                        S r SSKJr  SSKrSSKrSSKrSSKJr  SSK	J
r
  SSKJr  SSKJr  \R                  " \5      rSS jrSS	 jrS
S.       SS jjr        SS jrg)z!Config handling logic for Flake8.    )annotationsN)Any)
exceptions)VALID_CODE_PREFIX)OptionManagerc                ^    [         R                  " U 5      nUR                  UR                  4$ )N)osstatst_inost_dev)ssts     Z/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/flake8/options/config.py	_stat_keyr      s"    	B99bii    c                T   [         R                  R                  S5      n US:w  a  [        U5      OS n[        U 5      n S HX  n[
        R                  " 5       n[         R                  R                  X5      n UR                  USS9  SU;   d  SU;   a  Us  $ MZ     [         R                  R                  U 5      n[        U5      n	X:X  d  X:X  a   g Un U	nM  ! [         a    S n Nf = f! [        [
        R                  4 a!  n[        R                  SXg5         S nAM  S nAff = f)N~)z	setup.cfgztox.iniz.flake8UTF-8encodingflake8zflake8:local-pluginsz"ignoring unparseable config %s: %s)r	   path
expanduserr   OSErrorconfigparserRawConfigParserjoinreadUnicodeDecodeErrorParsingErrorLOGwarningdirname)
r   home	home_statdir_stat	candidatecfgcfg_pathenew_pathnew_dir_stats
             r   _find_config_filer-      s   77c"D'+s{IdO	 H
<I..0Cww||D4H$G4
 s?&<&C#O 'D = 77??4( *#|'@ 	 D#H' 	  	 '(A(AB O@(NNOs)   C :C,C)(C),D'D""D'F)isolatedc                  [         R                  R                  S5      nU(       a  [        R                  " 5       U4$ U c  [        U5      n [        R                  " 5       nU bN  UR                  U SS9(       d  [        R                  " SU  35      e[         R                  R                  U 5      nOUnU H1  nUR                  USS9(       a  M  [        R                  " SU 35      e   XE4$ )a,  Load the configuration given the user options.

- in ``isolated`` mode, return an empty configuration
- if a config file is given in ``config`` use that, otherwise attempt to
  discover a configuration using ``tox.ini`` / ``setup.cfg`` / ``.flake8``
- finally, load any ``extra`` configuration files
.r   r   z*The specified config file does not exist: )
r	   r   abspathr   r   r-   r   r   ExecutionErrorr#   )configextrar.   pwdr(   cfg_dirfilenames          r   load_configr8   8   s     ''//#
C++-s22~"3'

&
&
(Cxxx1++<VHE  ''//&) xx7x33++<XJG   <r   c           
        SU;  a  0 $ 0 nUS    GH8  nU R                   R                  U5      nUc  [        R                  SU5        M:  UR                  [
        L d  UR                  S:X  a  UR                  SU5      nO5UR                  S;   a  UR                  SU5      nOUR                  SU5      n[        R                  SXF5        UR                  Xb5      nUS;   aI  U HC  n[        R                  " U5      (       a  M   [        SU< SU< S	[        R                  < 35      e   UR                  c   eXsUR                  '   GM;     U$ )
z4Parse and normalize the typed configuration options.r   z(Option "%s" is not registered. Ignoring.count>   
store_truestore_falsezOption "%s" returned value: %r>   ignoreextend-ignorezError code z supplied to z option does not match )config_options_dictgetr!   debugtypeintactiongetint
getboolean	normalizer   match
ValueErrorpatternconfig_name)	option_managerr(   r6   config_dictoption_nameoptionvaluefinal_value
error_codes	            r   parse_configrS   b   sI    s	K8}3377D>II@+N ;;#'!9JJx5E]];;NN8[9EGGHk2E		2KG&&u655)
(..z::$%j^ 4''2o 6**;*C*C)FH  * !!---*5F&&'; %> r   )r   strreturnztuple[int, int])r   rT   rU   
str | None)r3   rV   r4   z	list[str]r.   boolrU   z(tuple[configparser.RawConfigParser, str])rL   r   r(   zconfigparser.RawConfigParserr6   rT   rU   zdict[str, Any])__doc__
__future__r   r   loggingos.pathr	   typingr   r   r   flake8.defaultsr   flake8.options.managerr   	getLogger__name__r!   r   r-   r8   rS    r   r   <module>rb      s    ' "      - 0! L 	''' 	'
 .'T*!*	%* * 	*r   