
    if              	         U 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	m
Z
 ej        dk    rd dlZnd dlZd dlmZmZmZmZ d dlmZmZmZmZ d dlmZ d dlmZ d d	lmZmZ ee z  e!z  e"z  e#eef         z  e$e         z  e%e!e!f         z  Z&d
e'd<   eege&f         Z(d
e'd<    G d dej)                  Z*ddZ+dddZ,ddZ-ddZ.ddZ/dd"Z0dd#Z1dd%Z2dd&Z3dd(Z4i d)e+d*ed+e.d,d- d.e1d/e.d0e.d1e3d2e2d3e d4d5 d6d7 d8d9 d:d; d<d= d>d? d@dA dB e.e.e dC e,e,dDZ5dEe'dF<   e56                                Z7dEe'dG<   e78                    i d)e+d,dH d.dI d1dJ d2dK d4e,d6e,d8e,d:dL d<e,d>dM d@dN dOe,dPe/dQe,dRe,           	 dddWZ9	 dddXZ:	 	 dddaZ;dddZ<ddfZ=ddiZ>ej?        fddqZ@ddsZAddvZBddyZCdd}ZDdd~ZE G d deF          ZGdS )    )annotationsN)StringIO)      )CallableMappingMutableMappingSequence)AnyFinalTextIO	TypeAlias)Never)defaults)PER_MODULE_OPTIONSOptionsr   _CONFIG_VALUE_TYPES_INI_PARSER_CALLABLEc                  $     e Zd ZdZd	 fdZ xZS )
VersionTypeErrorz>Provide a fallback value if the Python version is unsupported.argsr   fallbacktuple[int, int]returnNonec               B    || _          t                      j        |  d S N)r   super__init__)selfr   r   	__class__s      Q/root/projects/qq-shell/venv/lib64/python3.11/site-packages/mypy/config_parser.pyr   zVersionTypeError.__init__    s$     $    )r   r   r   r   r   r   )__name__
__module____qualname____doc__r   __classcell__)r!   s   @r"   r   r      sC        HH                   r#   r   vstr | floatr   r   c                (   t          j        dt          |                     }|st          j        d|  d          t          |                    d                    t          |                    d                    }}|dk    r|dk    rn|dk    rd|t          j        d         k     rM dj	        |gt          j        R  }t          | t                    r|d	z  }t          |t          j        
          nt          j        d| d          ||fS )Nz\A(\d)\.(\d+)\ZzInvalid python version 'z' (expected format: 'x.y')         r   z6Python 3.{} is not supported (must be {}.{} or higher)z7. You may need to put quotes around your Python version)r   zPython major version 'z' out of range (must be 3))rematchstrargparseArgumentTypeErrorintgroupr   PYTHON3_VERSION_MINformat
isinstancefloatr   )r)   mmajorminormsgs        r"   parse_versionr>   %   s-   
#SVV,,A c()aA)a)a)abbbqwwqzz??C

OO5Ezzeqjj	!8/222QJQ 4  C !U## QPP"31MNNNN 3 (FUFFF
 
 	
 %<r#   ,str | Sequence[str] | objectsplit_regexr1   	list[str]c                    dddt          | t                    rDd	 t          j        ||           D             }|r!|d
         dk    r|                    d
           |S t          | t
                    rfd| D             S  |            dS )zSplit and trim a str or sequence (eg: list) of str into a list of str.
    If an element of the input is not str, a type error will be raised. xobjectadditional_infor1   r   r   c                `    t          j        d|  dt          |           j         d|           )Nz<Expected a list or a stringified version thereof, but got: 'z', of type .)r2   r3   typer$   )rE   rG   s     r"   complainztry_split.<locals>.complainA   s@    (}1}}Y]^_Y`Y`Yi}}l{}}
 
 	
r#   c                6    g | ]}|                                 S  strip.0ps     r"   
<listcomp>ztry_split.<locals>.<listcomp>G   s     ===q===r#   c                |    g | ]8}t          |t                    r|                                n |d           9S )z (As an element of the list.))rG   r8   r1   rO   )rQ   rR   rK   s     r"   rS   ztry_split.<locals>.<listcomp>L   sZ     
 
 
  a%%R			Xa1PQQQ	
 
 
r#   N)rD   )rE   rF   rG   r1   r   r   )r8   r1   r/   splitpopr
   )r)   rA   itemsrK   s      @r"   	try_splitrZ   =   s    
 
 
 
 

 !S ==BH[!$<$<=== 	U2Y"__IIbMMM	Ax	 	  

 
 
 
 
 
 
 	
 	r#   
allow_listc                    | D ]A}d| }d|v rt          j        | d          d|v sd|v rt          j        | d          B| S )NzInvalid allow list entry: *z5 (entries are already prefixes so must not contain *)\/zA (entries must be packages like foo.bar not directories or files))r2   r3   )r[   rR   r=   s      r"   validate_package_allow_listr`   X   s     	 	.1..!88,MMM   199q,YYY   ! r#   pathc                z    t           j                            t           j                            |                     S )ziExpand the user home directory and any environment variables contained within
    the provided path.
    )osra   
expandvars
expanduser)ra   s    r"   expand_pathrf   f   s*    
 7bg0066777r#   str | Sequence[str]c                    t          | t                    r+|                                 r|                                 gng S d | D             S )Nc                ^    g | ]*}|                                 |                                 +S rM   rN   rP   s     r"   rS   z(str_or_array_as_list.<locals>.<listcomp>q   s-    ...!AGGII.AGGII...r#   rV   )r)   s    r"   str_or_array_as_listrj   n   sI    !S 0ggii/		{{R/..q....r#   pathsSequence[str]c                    g }| D ]f}t          |                                          }t          j        |d          }|r|                    |           Q|                    |           g|S )zTake a list of files/directories (with support for globbing through the glob library).

    Where a path/glob matches no file, we still include the raw path in the resulting list.

    Returns a list of file paths
    T)	recursive)rf   rO   fileglobglobextendappend)rk   expanded_pathsra   globbed_filess       r"   split_and_match_files_listru   t   s}     N ( (4::<<(( dd;;; 	(!!-0000!!$''''r#   c                :    t          t          |                     S )zTake a string representing a list of files/directories (with support for globbing
    through the glob library).

    Where a path/glob matches no file, we still include the raw path in the resulting list.

    Returns a list of file paths
    )ru   split_commas)rk   s    r"   split_and_match_filesrx      s     &l5&9&9:::r#   choicec           	         g d}| |vrEt          j        d                    | d                    d |D                                           | S )N)normalsilentskiperror$invalid choice '{}' (choose from {}), c              3  "   K   | ]
}d | d V  dS 'NrM   rQ   rE   s     r"   	<genexpr>z'check_follow_imports.<locals>.<genexpr>   *      !<!<q(a(((!<!<!<!<!<!<r#   r2   r3   r7   joinry   choicess     r"   check_follow_importsr      sg    333GW(299		!<!<G!<!<!<<< 
 
 	

 Mr#   c           	         ddg}| |vrEt          j        d                    | d                    d |D                                           | S )Nglobalper_filer   r   c              3  "   K   | ]
}d | d V  dS r   rM   r   s     r"   r   z%check_junit_format.<locals>.<genexpr>   r   r#   r   r   s     r"   check_junit_formatr      sf    $GW(299		!<!<G!<!<!<<< 
 
 	

 Mr#   valuec                v    |                      d          }|r!|d         dk    r|                    d           |S )Nr?   rT   rD   )rW   rX   )r   rY   s     r"   rw   rw      s=     KKE rb		"Lr#   python_versioncustom_typing_modulecustom_typeshed_dir	mypy_pathc                @    d t          j        d|           D             S )Nc                P    g | ]#}t          |                                          $S rM   )rf   rO   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s(    PPPqK		22PPPr#   [,:])r/   rW   ss    r"   <lambda>r      s!    PPBHVQ<O<OPPP r#   filesquickstart_file	junit_xmljunit_formatfollow_importsno_site_packagespluginsc                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s     ===!''))===r#   rw   r   s    r"   r   r      s    ==\!__=== r#   always_truec                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s     AAAAaggiiAAAr#   r   r   s    r"   r   r      s    AAaAAA r#   always_falsec                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>        BBBQqwwyyBBBr#   r   r   s    r"   r   r          BB,q//BBB r#   untyped_calls_excludec                N    t          d t          |           D                       S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s     ,,,q,,,r#   )r`   rw   r   s    r"   r   r      s(    'B,,LOO,,,( ( r#   enable_incomplete_featurec                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s     +O+O+O!AGGII+O+O+Or#   r   r   s    r"   r   r      s    +O+O|A+O+O+O r#   disable_error_codec                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s     $H$H$H1QWWYY$H$H$Hr#   r   r   s    r"   r   r      s    $H$HQ$H$H$H r#   enable_error_codec                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s     #G#G#G!AGGII#G#G#Gr#   r   r   s    r"   r   r      s    #G#G|A#G#G#G r#   c                4    d t          |           D             S )Nc                6    g | ]}|                                 S rM   rN   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   r   r#   r   r   s    r"   r   r      r   r#   c                ,    |                                  gS r   rN   r   s    r"   r   r      s    !'')) r#   )package_root	cache_dirpython_executablestrictexcludepackagesmodulesz&Final[dict[str, _INI_PARSER_CALLABLE]]ini_config_typestoml_config_typesc                6    d t          | d          D             S )Nc                ,    g | ]}t          |          S rM   )rf   rP   s     r"   rS   z<lambda>.<locals>.<listcomp>   s    MMM1AMMMr#   r   rZ   r   s    r"   r   r      s    MM	!V8L8LMMM r#   c                :    t          t          |                     S r   )ru   rZ   r   s    r"   r   r      s    5illCC r#   c                :    t          t          |                     S r   )r   r1   r   s    r"   r   r      s    "4SVV"<"< r#   c                :    t          t          |                     S r   )r   r1   r   s    r"   r   r      s    $8Q$@$@ r#   c                :    t          t          |                     S r   )r`   rZ   r   s    r"   r   r      s    +FyQR||+T+T r#   c                     t          |           S r   r   r   s    r"   r   r      s    	! r#   c                     t          |           S r   r   r   s    r"   r   r      s    y|| r#   r   r   r   r   config_filestderrTextIO | NoneLtuple[MutableMapping[str, Any], dict[str, _INI_PARSER_CALLABLE], str] | Nonec                   t           j                            |           sd S 	 t          |           ryt	          | d          5 }t          j        |          }d d d            n# 1 swxY w Y   |                    di           }d|vrd S d|d         i}t          |          }t          }n/t          j                    }|                    |            t          }nE# t
          j        t          j        t           f$ r!}t#          |  d| |           Y d }~d S d }~ww xY wt           j                            |           t&          j        v rd|vrd S ||| fS )Nrbtoolmypy: file)rc   ra   existsis_tomlopentomllibloadgetdestructure_overridesr   configparserRawConfigParserreadr   TOMLDecodeErrorErrorConfigTOMLValueErrorprintbasenamer   SHARED_CONFIG_NAMES)r   r   f	toml_dataparserconfig_typeserrs          r"   _parse_individual_filer      s    7>>+&& t; 	,k4(( ,A#LOO	, , , , , , , , , , , , , , , "fb11IY&&t6!23I*955F,LL!133FKK$$$+L#\%79MN   %%%%F3333ttttt 
w$$(DDDW]I]I]t<,,sB   C A#C #A''C *A'+C 
AC !D<DDc                   t           j                            t          j                              	 t          j        t          j        z   D ]U}t           j                            t           j                            |                    }t          ||           }|R|c S t          fddD                       rn)t           j                                      }|k    rn|t          j        D ]}t          ||           }||c S d S )NTc              3     K   | ]A}t           j                            t           j                            |                    V  Bd S r   )rc   ra   r   r   )rQ   cvs_rootcurrent_dirs     r"   r   z$_find_config_file.<locals>.<genexpr>  sR       
 
DLBGNN27<<X>>??
 
 
 
 
 
r#   )z.gitz.hg)rc   ra   abspathgetcwdr   CONFIG_NAMESr   relpathr   r   anydirnameUSER_CONFIG_FILES)r   namer   ret
parent_dirr   s        @r"   _find_config_filer     s!    '//")++..K!)H,HH 	 	D'//"',,{D*I*IJJK(f==C{JJJ 
 
 
 
P_
 
 
 
 
 	 W__[11
$$ !"  1  $[&99;


4r#   optionsr   set_strict_flagsCallable[[], None]filename
str | Nonestdoutr   c                   |pt           j        }|pt           j        }|t          ||          nt	          |          }|dS |\  }}}|| _        t          j                            t          j        	                    |                    t          j
        d<   d|vrB|s+t          j                            |          t          j        vrt          | d|           ni|d         }	| d}
t          |
| ||	||          \  }}|                                D ]\  }}t#          | ||           | j                            |           |                                D ]\  }}	|                    d          rt+          ||          }
t          |
| ||	||          \  }}|rOt          |
d                    d	                    d
 t1          |          D                                 |           t3          |          t4          z
  rxt          |
d                    d	                    t1          t3          |          t4          z
                                |           d |                                D             }|dd         }|                    d          D ]                    t          j        d          t          j        r                     t          j        d          t?          fddD                       s,t?          d                     d          D                       rt          |
d|           || j         <   dS )zParse a config file into an Options object.

    Errors are written to stderr but are not fatal.

    If filename is None, fall back to default config files.
    NMYPY_CONFIG_FILE_DIRr   z": No [mypy] section in config filer   z
: [mypy]: mypy-z3Per-module sections should not specify reports ({})r   c              3      K   | ]	}|d z   V  
dS )_reportNrM   )rQ   r   s     r"   r   z$parse_config_file.<locals>.<genexpr>a  s&      !M!MA!i-!M!M!M!M!M!Mr#   z=Per-module sections should only specify per-module flags ({})c                ,    i | ]\  }}|t           v ||S rM   )r   )rQ   kr)   s      r"   
<dictcomp>z%parse_config_file.<locals>.<dictcomp>m  s)    WWWDAqqDV?V?V1a?V?V?Vr#      r?   rI   c              3      K   | ]}|v V  	d S r   rM   )rQ   crp   s     r"   r   z$parse_config_file.<locals>.<genexpr>v  s'      11QqDy111111r#   z?[]!c              3  *   K   | ]}d |v o|d k    V  dS )r]   NrM   r   s     r"   r   z$parse_config_file.<locals>.<genexpr>v  s@       9 9./C1H)c9 9 9 9 9 9r#   ziPatterns must be fully-qualified module names, optionally with '*' in some components (e.g spam.*.eggs.*))!sysr  r   r   r   r   rc   ra   r   r   environr   r   r   r   parse_sectionrY   setattrreport_dirsupdate
startswith
get_prefixr7   r   sortedsetr   rW   replacesepaltsepr   per_module_options)r   r  r  r  r   r   r   r   	file_readsectionprefixupdatesr  r  r)   r   globsrp   s                    @r"   parse_config_filer%  .  s    !szF!szF  	x000v&& 
 {&)#FL)#G)+9S9S)T)TBJ%&V 	Qrw''	22(:VVVYBBBPPPP.))),G-wf 
  
 MMOO 	# 	#DAqGQ"""""";/// )? )?g??7## (	?	400F#0!17L&$ $ G[  IPP		!M!M9L9L!M!M!MMM       7||00 XSZZ		&W8J)J"K"KLL       XWGMMOOWWWHEC(( ? ?||BFC009 8<<	377D1111&11111 
?S 9 937::c??9 9 9 6 6 
? J#	     8?G.t44S)? )?r#   r   r   c                    t          |           r4dd                    |                    d          dd                    z  }n|}|  d| dS )Nzmodule = "%s"-r,   z: [z]:)r   r   rW   )r   r   module_name_strs      r"   r  r    sY    y )CHHTZZ__QRR5H,I,II//O////r#   boolc                P    |                                                      d          S )Nz.toml)lowerendswith)r  s    r"   r   r     s     >>$$W---r#   r   dict[str, Any]c           
        d| d         vr| S t          | d         d         t                    st          d          |                                 }|d         d         D ]}d|vrt          d          t          |d         t                    r
|d         g}n3t          |d         t                    r	|d         }nt          d          |D ]}|                                }|d= d| }||vr|||<   (|                                D ]B\  }}|||         v r(||         |         |k    rt          d| d	| d
          |||         |<   C|d         d= |S )aF  Take the new [[tool.mypy.overrides]] section array in the pyproject.toml file,
    and convert it back to a flatter structure that the existing config_parser can handle.

    E.g. the following pyproject.toml file:

        [[tool.mypy.overrides]]
        module = [
            "a.b",
            "b.*"
        ]
        disallow_untyped_defs = true

        [[tool.mypy.overrides]]
        module = 'c'
        disallow_untyped_defs = false

    Would map to the following config dict that it would have gotten from parsing an equivalent
    ini file:

        {
            "mypy-a.b": {
                disallow_untyped_defs = true,
            },
            "mypy-b.*": {
                disallow_untyped_defs = true,
            },
            "mypy-c": {
                disallow_untyped_defs: false,
            },
        }
    	overridesr   z~tool.mypy.overrides sections must be an array. Please make sure you are using double brackets like so: [[tool.mypy.overrides]]modulezetoml config file contains a [[tool.mypy.overrides]] section, but no module to override was specified.zytoml config file contains a [[tool.mypy.overrides]] section with a module value that is not a string or a list of stringsr  z\toml config file contains [[tool.mypy.overrides]] sections with conflicting values. Module 'z ' has two different values for 'r   )r8   listr   copyr1   rY   )	r   resultoverrider   r0  module_overridesold_config_namenew_key	new_values	            r"   r   r     s   @ )F+++i'4d;; 
"R
 
 	

 ^^F6N;/ #A #A8##&D  
 hx(#.. 		)*GG*D11 	x(GG&    	A 	AF'}} *.f..Of,,*:''*:*@*@*B*B 
A 
A&GY6/#:::"?3G<	II2b/5b bW^b b b  
 8AF?+G44
A	A& 	v{#Mr#   r"  templater!  Mapping[str, Any]r   r   (tuple[dict[str, object], dict[str, str]]c                   i }i }ddd}|D ]}	d}
|	}|	                     d          r|dz  }|	|v r
||	         }n|	|v r*t          |  d|	 d||	          d	||	          d
|           ]t          ||d          }||	                     d          r\|	dd                             dd          }|t          j        v rt          ||	                   ||<   nt          |  d|	 |           |	                    d          rn
|	                    d          r%t          ||dd                   r|dd         }d}
n|	                    d          rt          |d|z             rd|z   }d}
n|	                    d          r%t          ||dd                   r|dd         }d}
nf|	                    d          r+t          |d|dd         z             rd|dd         z   }d}
n&|	dk    rnt          |  d|	 d||	          |           |
rt          ||d          }n|t          |          nd}d}	 |t          u rSt          |t                    r#t          |                    |	                    }n|                    |	          }|
r| }nt!          |          r|
rt          |  d| |           	  ||                    |	                    }n# t"          $ r)}t          |  |	 d| |           |j        }Y d}~nQd}~wt&          j        $ r#}t          |  |	 d| |           Y d}~2d}~ww xY wt          |  d|	 d |           Sn0# t*          $ r#}t          |  |	 d| |           Y d}~|d}~ww xY w|	dk    r|r
 |             |||<   d|vrg |d<   d|vrg |d<   ||fS )!z|Parse one section of a config file.

    Returns a dict of option values encountered, and a dict of report directories.
    r   r   )enabled_error_codesdisabled_error_codesFallow_redefinition_oldzUnrecognized option: z = z (did you mean z?)r   Nr
  i_r'  zUnrecognized report type: x_no_r   Tallowdisdisallowshow_hide_r  r   zCan not invert non-boolean key r   zDon't know what type z should have)r,  r   getattrr  r   REPORTER_NAMESr1   r  hasattrrJ   r)  r8   dictconvert_to_booleanr   
getbooleancallabler   r   r2   r3   
ValueError)r"  r9  r  r!  r   r   resultsr  invalid_optionskeyinvertoptions_keyctdvreport_typer)   err_versionr   s                     r"   r  r    sR    "$G"$K
  3 4 O
  Q! Q! <<,-- 	"6!K,c"BBO## ; ; ; ; ; ;"1#"6; ; ;   
 ;55Bz<<	** "%crc("2"23"<"<K"h&===36ws|3D3DK00HH3HHvVVVV>>$'' _^^E** _wxQRR/Q/Q _"-abb/K!FF^^G,, _5;CV1W1W _"'+"5K!FF^^J// 	_GHkRSRTRTo4V4V 	_"-abb/K!FF^^G,, _7[YZY[Y[_C\1]1] _")KO";K!FFH__VPP#PP'#,PPW]^^^^  ;==BB^bB	Tzzgt,, 0*7;;s+;+;<<AA**3//A A"  VQQKQQX^____7;;s++,,AA' - - -V9S99K99GGGG#,AAAAAA1   V1S11C11????HHHH GGcGGGfUUUU 	 	 	V)S))C))7777HHHH	 (?? #  """  7**(*$%'))')#$KsU   ;BM K M  
M*L	M M L>8M >MM  
N*NN
Any | Nonec                8   t          | t                    r| S t          | t                    st          |           } |                                 t          j        j        vrt          d|            t          j        j        |                                          S )zAReturn a boolean value translating from other types if necessary.zNot a boolean: )r8   r)  r1   r+  r   r   BOOLEAN_STATESrP  )r   s    r"   rM  rM  U  s    % eS!! E

{{}}L8GGG2522333'6u{{}}EEr#   r   tuple[list[str], list[str]]c                   g }g }g }d}|t          |           k     r)| |         dk    r=|                    d                    |                                                     g }n| |         dk    r|dz  }|t          |           k     rK| |         dk    r?|                    | |                    |dz  }|t          |           k     r| |         dk    ?|t          |           k    r)|                    d           |                                 n|                    | |                    |dz  }|t          |           k     )|r:|                    d                    |                                                     ||fS )zfSplit s on commas, except during quoted sections.

    Returns the parts and a list of error messages.r   r?   rD   "r,   z+Unterminated quote in configuration comment)lenrr   r   rO   clear)r   partscurerrorsis        r"   split_directiverf  `  sn    ECF	A
c!ff**Q43;;LL++--...CCqTS[[FAc!ff**1

1Q4   Q c!ff**1 CFF{{KLLL		JJqt	Q c!ff**  +RWWS\\''))***&=r#   line tuple[dict[str, str], list[str]]c                    i }t          |           \  }}|D ]M}d|vr|}d}n#d |                    dd          D             \  }}|                    dd          }|d}|||<   N||fS )z5Rewrite the mypy comment syntax into ini file syntax.=Nc              3  >   K   | ]}|                                 V  d S r   rN   r   s     r"   r   z.mypy_comments_to_config_map.<locals>.<genexpr>  s*      BB17799BBBBBBr#   r,   r'  rA  True)rf  rW   r  )rg  r9  r   entriesrd  entryr   r   s           r"   mypy_comments_to_config_mapro  }  s    G%d++OGV 
 
eDEEBBekk#q.A.ABBBKD%||C%%=EF?r#   r   list[tuple[int, str]]/tuple[dict[str, object], list[tuple[int, str]]]c           	     l   g }g g d}| D ]$\  }t          j                    }t          ||          \  }}d|v r|                    df           |d= ||d<   |                    fd|D                        t                      }ddfd	}	t          d
||	|d         t          |          \  }
}|                    fd|                                	                                
                    d          D                        |r|                    df           r|                    df           d|
v rjt          |
d         x}t                    rMt          |                    dg           x}t                    r"t          t          ||z                       |
d<   d|
v rjt          |
d         x}t                    rMt          |                    dg           x}t                    r"t          t          ||z                       |
d<   |                    |
           &||fS )zParse a collection of inline mypy: configuration comments.

    Returns a dictionary of options to be applied and a list of error messages
    generated.
    )r   r   r   z4python_version not supported in inline configurationdummyc              3      K   | ]}|fV  	d S r   rM   rQ   rE   linenos     r"   r   z&parse_mypy_comments.<locals>.<genexpr>  s'      88avqk888888r#   Fr   r   c                     d d S )NTrM   )strict_founds   r"   r  z-parse_mypy_comments.<locals>.set_strict_flags  s    LLLr#   rD   )r   c              3  $   K   | ]
}||fV  d S r   rM   ru  s     r"   r   z&parse_mypy_comments.<locals>.<genexpr>  s-      VVaTUVvqkVVVVVVr#   
z-Reports not supported in inline configurationzSetting "strict" not supported in inline configuration: specify it in a configuration file instead, or set individual inline flags (see "mypy -h" for the list of flags enabled in strict mode)r   r   )r   r   )r   r   ro  rr   rq   r   r  r   getvaluerO   rW   r8   r1  r   r  r  r  )r   r9  rd  sectionsrg  r   r   parse_errorsr   r  new_sectionsreportsneeceecndecdecrv  rx  s                   @@r"   parse_mypy_commentsr    s    %'F8:RT"U"UH 4& 4& -// ;D( K Kw&&MM6#YZ[[[()!w8888<888888	  	  	  	  	  	  !.*F7O=MV\!
 !
 !
g 	VVVV6??+<+<+B+B+D+D+J+J4+P+PVVVVVV 	UMM6#RSTTT 	MMS    <//<0C#DD4dKK 0(,,/BB"G"GG3NN 0 17s4#:0G0GL,- L00<0D#EE4tLL 1(,,/CR"H"HH3$OO 1 28D3J1H1HL-.%%%%Vr#   c                    | r|sdS t          |           sd                    d |D                       S dd                    t          |                    z  S )NrD   r   c              3  "   K   | ]
}d | dV  dS )z[mypy-]NrM   )rQ   r0  s     r"   r   z*get_config_module_names.<locals>.<genexpr>  s.      BB+&+++BBBBBBr#   zmodule = ['%s']z', ')r   r   r  )r  r   s     r"   get_config_module_namesr    se     7 r8 CyyBB'BBBBBBF7OO < <==r#   c                      e Zd ZdS )r   N)r$   r%   r&   rM   r#   r"   r   r     s        Dr#   r   )r)   r*   r   r   )r?   )r)   r@   rA   r1   r   rB   )r[   rB   r   rB   )ra   r1   r   r1   )r)   rg   r   rB   )rk   rl   r   rB   )rk   r1   r   rB   )ry   r1   r   r1   )r   r1   r   rB   r   )r   r1   r   r   r   r   )r   r   r   r   )NN)r   r   r  r  r  r  r  r   r   r   r   r   )r   r1   r   r1   r   r1   )r  r1   r   r)  )r   r-  r   r-  )r"  r1   r9  r   r  r  r!  r:  r   r-  r   r   r   r;  )r   rZ  r   r)  )r   r1   r   r]  )rg  r1   r9  r   r   rh  )r   rp  r9  r   r   rq  )r  r  r   rB   r   r1   )H
__future__r   r2   r   rp   ro   rc   r/   r  ior   version_infor   tomlicollections.abcr   r   r	   r
   typingr   r   r   r   typing_extensionsr   r   r   mypy.optionsr   r   r1   r)  r4   r9   rL  r1  tupler   __annotations__r   r3   r   r>   rZ   r`   rf   rj   ru   rx   r   r   rw   r   r2  r   r  r   r   r%  r  r   r   r   r  rM  rf  ro  r  r  rP  r   rM   r#   r"   <module>r     s7   " " " " " " "          				 				 



      wNNNN G G G G G G G G G G G G 0 0 0 0 0 0 0 0 0 0 0 0 # # # # # #       4 4 4 4 4 4 4 4 $JutCH~-S	9E#s(OK      #+C52E+E"F  F F F F         x1         0    6   8 8 8 8/ / / /   (	; 	; 	; 	;         <m<C< ;< PP	<
 "< {< < &< *< < ==< AA< BB<   <"  !O!O#<$ HH%<& GG'<( CB$$$5< < <     < =M<Q<Q<S<S  S S S S   -MM 	CC 	<<	
 	@@ 	9 	y 		 	 !T!T 	$Y 	44 	33 		 	' 	I  	9!  . /3- - - - -F !    H ! R? R? R? R? R?j0 0 0 0. . . .P P P Pr Zo  o  o  o  o dF F F F   :   &@ @ @ @F> > > >	 	 	 	 	: 	 	 	 	 	r#   