o
    uJAfx                     @  s  U d dl m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m	Z	m
Z
 d dlZd dlZddlmZmZmZ ddlmZmZmZmZ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! ddl"m#Z#m$Z$m%Z%m&Z& ej'rd dl(Z(ddl)m*Z* ddl"m+Z+ dddZ,dddZ-dddZ.G dd dZ/			ddd#d$Z0dd(d)Z1dd-d.Z2dd2d3Z3dd5d6Z4dd9d:Z5dd<d=Z6ddAdBZ7ddDdEZ8dddHdIZ9ddKdLZ:ddOdPZ;ddRdSZ<ddUdVZ=ddXdYZ>dd]d^Z?dd_d`Z@ddbdcZAddedfZBddhdiZCddjdkZDddsdtZEdddwdxZFddd{d|ZGddd~dZHdddZIg ZJdeKd< dddZLdddZMdddZNdddZOddddZPdS )    )annotations)redirect_stdoutN)PathPurePath   )buildmesonlibcoredata)IntrospectionInterpreterBUILD_TARGET_FUNCTIONSAstConditionLevelAstIDGeneratorAstIndentationGeneratorAstJSONPrinter)backends)
Dependency)environment)ObjectHolder)	OptionKey)FunctionNode	ArrayNodeArgumentNodeBaseStringNode)Interpreter)BaseNodeinfo_dirstrreturnc                 C  s   t j| dS )Nmeson-info.jsonospathjoin)r    r#   6/usr/lib/python3.10/site-packages/mesonbuild/mintro.pyget_meson_info_file/   s   r%   c                   C  s   dS )Nz1.0.0r#   r#   r#   r#   r$   get_meson_introspection_version2   s   r&   T.List[str]c                   C  s   ddgS )Nz>=1.0z<2.0r#   r#   r#   r#   r$   (get_meson_introspection_required_version5      r(   c                   @  s   e Zd Z		ddd
dZdS )IntroCommandNdescr   func/T.Optional[T.Callable[[], T.Union[dict, list]]]no_bdGT.Optional[T.Callable[[IntrospectionInterpreter], T.Union[dict, list]]]r   Nonec                 C  s   |d | _ || _|| _d S )N.)r+   r,   r.   )selfr+   r,   r.   r#   r#   r$   __init__9   s   

zIntroCommand.__init__)NN)r+   r   r,   r-   r.   r/   r   r0   )__name__
__module____qualname__r3   r#   r#   r#   r$   r*   8   s    r*   r	   T.Optional[cdata.CoreData]	builddataT.Optional[build.Build]backendT.Optional[backends.Backend]'T.Mapping[str, IntroCommand]'c                   sh   rr         jnd   tdtdtdfdtdfdddfd	td
fddt	dfdtdfdddfdtdfdddfdtd fddt
dfdtdt
dfdtdfdddfdtdfdddfdtdfd ddfd!td"fd#dtdfd$td% fd&dtdfd'td(fd)ddfgS )*NastzDump the AST of the meson file)r.   
benchmarkszList all benchmarksc                        t  S N)list_benchmarksr#   )benchmarkdatar#   r$   <lambda>O       z/get_meson_introspection_types.<locals>.<lambda>)r,   buildoptionszList all build optionsc                     r?   r@   )list_buildoptionsr#   r	   r#   r$   rC   P   rD   )r,   r.   buildsystem_filesz(List files that make up the build systemc                     s
   t  S r@   )list_buildsystem_filesr#   )r8   interpreterr#   r$   rC   Q      
 	compilerszList used compilersc                     r?   r@   )list_compilersr#   rG   r#   r$   rC   R   rD   dependencieszList external dependenciesc                     s
   t  S r@   )	list_depsr#   )r:   r	   r#   r$   rC   S   rK   Zscan_dependenciesz2Scan for dependencies used in the meson.build file	installedz(List all installed files and directoriesc                     r?   r@   )list_installedr#   installdatar#   r$   rC   U   rD   Zinstall_planz;List all installed files and directories with their detailsc                     r?   r@   )list_install_planr#   rR   r#   r$   rC   V   rD   machinesz2Information about host, build, and target machinesc                     r?   r@   )list_machinesr#   r8   r#   r$   rC   W   rD   ZprojectinfozInformation about projectsc                     r?   r@   )list_projinfor#   rW   r#   r$   rC   X   rD   targetszList top level targetsc                     s   t  S r@   )list_targetsr#   )r:   r8   rS   r#   r$   rC   Y   s    testszList all unit testsc                     r?   r@   )
list_testsr#   testdatar#   r$   rC   Z   rD   )Zcreate_test_serialisationget_benchmarks	get_testsZcreate_install_datarJ   collectionsOrderedDictr*   dump_astlist_buildoptions_from_sourcelist_deps_from_sourcelist_projinfo_from_sourcelist_targets_from_sourcer	   r8   r:   r#   )r:   rB   r8   r	   rS   rJ   r^   r$   get_meson_introspection_typesA   s*   ri   parserargparse.ArgumentParserr0   c                 C  s   t  }| D ]\}}d|dd }| j|d|d|jd q| jdttjdd	d
d | jddddddd | jddddddd | jddddddd | jddddd d S )Nz--_-
store_trueF)actiondestdefaulthelpz	--backendr:   ninjaz8The backend to use for the --buildoptions introspection.)choicesrp   rq   rr   z-az--allallz Print all available information.z-iz--indentindentzEnable pretty printed JSON.z-fz--force-object-output
force_dictz]Always use the new JSON format for multiple entries (even for 0 and 1 introspection commands)builddir?r1   zThe build directory)nargsrq   rr   )ri   itemsreplaceadd_argumentr+   sortedcdatabackendlist)rj   intro_typeskeyvalflagr#   r#   r$   add_arguments_   s"   r   intrr
   T.Dict[str, T.Any]c                 C  s   t  }| j| |jS r@   )r   r=   acceptresult)r   Zprinterr#   r#   r$   rc   o   s   rc   rS   backends.InstallDataT.Dict[str, str]c                 C  s  i }| d ur| j D ]}tj| j|jtj|j|tj| j|j< q	| j	D ]}tj| j|j
||j< q'| jD ]}tj| j|j
tj|j||j< q9| jD ]}tj| j|j
||j< qQ| jD ]}tj| j|j
||j< qc| jD ]}tj|j}tj| j|j
|||< qu|S r@   )rY   r    r!   r"   prefixoutdirbasenamefname	build_dirdatainstall_pathheadersmaninstall_subdirssymlinksname)rS   restisr   r#   r#   r$   rQ   t   s"   


&


rQ   6T.Dict[str, T.Dict[str, T.Dict[str, T.Optional[str]]]]c           
        s   d fdd j D i} j j j jd D ]U\}}|D ]N}|jp%|}|j}|dkr9tj	
|tj	|j	}||jp>d |jpBd d}|dkr^|jpOg g f\}}	t|	|d< t||d	< ||i ||< ||| |j	< qq|S )
NrY   c                   s6   i | ]}t j j|j|j|jpd |jpd dqS )NZdestinationtag
subproject)r    r!   r"   r   r   Zout_namer   r   ).0targetrR   r#   r$   
<dictcomp>   s    z%list_install_plan.<locals>.<dictcomp>)r   r   r   r   r   r   r   exclude_dirsexclude_files)rY   r   r   r   r   r{   	data_typeinstall_path_namer    r!   r"   r   r   r   excludelistget)
rS   Zplanr   Z	data_listr   r   r   entryr   r   r#   rR   r$   rT      s8   

rT   cdata.CoreDatasubdirc                 C  s   |  tddkrdS |S )Nlayoutflatz	meson-out)
get_optionr   )r	   r   r#   r#   r$   get_target_dir   s   r   kT.List[T.Dict[str, T.Union[bool, str, T.List[T.Union[str, T.Dict[str, T.Union[str, T.List[str], bool]]]]]]]c                   s   g }t | jd fdd}| jD ]M | d }| d }t| j d	 | d
  d  d  d fdd d D  d dg g dd |D g dgg dd |D d  d dg7 }q|S )N	node_listT.List[BaseNode]r   T.List[Path]c                   s   g }| D ]T}g }t |trt|jj}|jjtv r|d nt |t	r)|jj}nt |t
r1|j}|D ]$}t |trKt |jtsBJ |t|jg7 }q3t |trW|t|g7 }q3q fdd|D }dd |D }|S )Nr   c                   s   g | ]
} d   | qS )r   r#   r   xr   root_dirr#   r$   
<listcomp>       zDlist_targets_from_source.<locals>.nodes_to_paths.<locals>.<listcomp>c                 S     g | ]}|  qS r#   )resolver   r#   r#   r$   r          )
isinstancer   r   args	arguments	func_namevaluer   popr   r   r   r   r   )r   r   nr   jr   r#   r$   nodes_to_paths   s.   






z0list_targets_from_source.<locals>.nodes_to_pathssourcesextra_filesr   r   idtype
defined_inc                   s   g | ]	}t j |qS r#   r   r   )r   r#   r$   r          z,list_targets_from_source.<locals>.<listcomp>outputsbuild_by_defaultunknownc                 S     g | ]}t |qS r#   r   r   r#   r#   r$   r      r   )languagecompiler
parametersr   generated_sourcesc                 S  r   r#   r   r   r#   r#   r$   r      r   rP   )r   r   r   r   filenamer   target_sourcesdependsr   r   rP   )r   r   r   r   )r   source_rootrY   r   r	   )r   tlistr   r   Zextra_fr#   )r   r   r   r$   rg      s4   

rg   build.Buildbackends.BackendT.List[T.Any]c                   s  g }| j   | j  i |jD ]}tj|j}tt	|j
|j|g|< q|jD ].}tj|j}ztj|j |< | tt	|j
|j| W q+ tyY   Y q+w |   D ]\}}t|tjsntdt| j j|j| || tjtj|jt j fdd|  D |j!|"||fdd|j#D |j$pd dd t%|dg D dd t%|dg D d	}	t%|d
d }
|
d ur|
& |	d
< t%|dd }|d ur||	d< |r|' rd|	d< fdd|  D }dd |D |	d< nd|	d< ||	 q`|S )NzxThe target object in `builddata.get_targets()` is not of type `build.Target`. Please file a bug with this error message.c                   s   g | ]
}t j |qS r#   r   r   )r   r   r#   r$   r     r   z list_targets.<locals>.<listcomp>c              	     s(   g | ]}t jt j |j|jqS r#   )r    r!   normpathr"   r   r   r   src_dirr#   r$   r     s   ( c                 S     g | ]}|j qS r#   r   )r   dr#   r#   r$   r         external_depsc                 S  r   r#   get_idr   libr#   r#   r$   r     r   rN   )r   r   r   r   r   r   r   r   r   rN   r   vs_module_defswin_subsystemTrP   c                   s   g | ]	}  |d gqS r@   )r   r   )install_lookuptabler#   r$   r     r   c                 S  s   g | ]	}|D ]}|qqS r#   r#   )r   Zsublistr   r#   r#   r$   r     r   Zinstall_filenameF)(r   get_build_dirget_source_dirrY   r    r!   r   r   r   r   r   r   r   r   r   appendr   KeyErrorget_targetsr{   r   r   TargetRuntimeErrorr   r	   r   get_basenameget_typenamer   r"   build_filenameget_outputsr   Zget_introspection_datar   r   getattrrelative_nameshould_install)r8   rS   r:   r   r   r   r   Zidnamer   r   r   r   Zifnr#   )r   r   r   r   r$   rZ      sX   



"
rZ   9T.List[T.Dict[str, T.Union[str, bool, int, T.List[str]]]]c                 C  s    dd | j d D }t| j|S )Nc                 S  s   g | ]}|d  qS r   r#   )r   r   r#   r#   r$   r   "  r   z1list_buildoptions_from_source.<locals>.<listcomp>subprojects)project_datarF   r	   )r   r   r#   r#   r$   rd   !  s   rd   r   T.Optional[T.List[str]]c                   s@  g |pg }t tj}tdtdh}i }i }i } j D ].\}}||v r+|||< q||v r4|||< q| rL|||< |jsL|D ]
}	|||j|	d< qAqd fd
d}
|
|d |
dd  j D d |
dd  j D d |
dd t	 j dd dD d |
|d |
dd  j D d |
|d S )N	errorlogsstdsplit)r   options'cdata.KeyedOptionDictType'sectionr   r   r0   c                   s   t |  D ]d\}}t||j| |r|j ndd}t|tj	r'd}n5t|tj
r0d}n,t|tjr>|j|d< d}nt|tjrGd}nt|tjrXd}|jrW|j|d< ntd	||d
< |j|d< | qd S )Nany)r   r   r  machinestringbooleanrt   ZcombointegerarrayzUnknown option typer   description)r~   r{   r   r   is_per_machine_optionr  get_lower_case_namer   r   UserStringOptionUserBooleanOptionUserComboOptionrt   UserIntegerOptionUserArrayOptionr   r
  r   )r  r  r   optoptdictZtypestrr	   Zoptlistr#   r$   add_keys;  s.   


z#list_buildoptions.<locals>.add_keyscorec                 S     i | ]\}}|  r||qS r#   )
is_backendr   kvr#   r#   r$   r   S      z%list_buildoptions.<locals>.<dictcomp>r:   c                 S  r  r#   )is_baser  r#   r#   r$   r   T  r  basec                 S  r  r#   )is_compilerr  r#   r#   r$   r   V  r  c                 S  s
   | d j S )Nr   )r  )r   r#   r#   r$   rC   V  rK   z#list_buildoptions.<locals>.<lambda>)r   r   	directoryc                 S  r  r#   )
is_projectr  r#   r#   r$   r   Z  r  usertest)r  r  r  r   r   r0   )
setr   BUILTIN_DIR_OPTIONSr   r  r{   
is_builtinyieldingevolver~   )r	   r   dir_option_namestest_option_namesdir_optionstest_optionscore_optionsr  r  r   r  r#   r  r$   rF   %  s@   





rF   r   c                   sJ   t h d}g }tD ]\ }}| fdd||D  q|S )N>   zmeson.optionsmeson.buildzmeson_options.txtc                 3  s(    | ]}t jt j |V  qd S r@   )r    r!   relpathr"   )r   frootr   r#   r$   	<genexpr>c  s     z.find_buildsystem_files_list.<locals>.<genexpr>)	frozensetr    walkextendintersection)r   Zbuild_filesfilelistrl   filesr#   r1  r$   find_buildsystem_files_list^  s   
r:  rJ   r   c                   s,   | j   t| } fdd|D }|S )Nc                   s   g | ]	}t  | qS r#   )r   as_posixr   r   r#   r$   r   j  r   z*list_buildsystem_files.<locals>.<listcomp>)r   r   r   Zget_build_def_files)r8   rJ   r8  r#   r   r$   rI   g  s   
rI   *T.Dict[str, T.Dict[str, T.Dict[str, str]]]c                 C  sl   i }dD ]/}i ||< t | j| D ] \}}| | | |j| |j|j	|
 d|| |< qq|S )N)hostr   )r   exelistZlinker_exelistfile_suffixesdefault_suffixversionfull_versionZ	linker_id)r   rL   r{   r   get_exelistget_linker_exelistr?  get_default_suffixrA  rB  get_linker_id)r	   rL   r  r   r   r#   r#   r$   rM   m  s   rM   'T.List[T.Dict[str, T.Union[str, bool]]]c                   s8   g }| j D ]}g d | fdd| D g7 }q|S )N)r   requiredrA  Zhas_fallbackZconditionalc                   s   i | ]\}}| v r||qS r#   r#   r  keysr#   r$   r     r  z)list_deps_from_source.<locals>.<dictcomp>)rN   r{   )r   r   r   r#   rI  r$   re   ~  s
   
re   .T.List[T.Dict[str, T.Union[str, T.List[str]]]]c                   s   i }d fdd dd fdd}| j j D ]}| r&||||j< qjj D ]1\}}t|t	r^|j
}t|tr^| r^|j|v rVtd||j d | q-|||||j< q-t| S )Nsrc_fileyT.Union[mesonlib.FileOrString, build.CustomTarget, build.StructuredSources, build.CustomTargetIndex, build.GeneratedList]r   r'   c                   s   t | tr| gS t | tjr| jjgS t | tjtj	tj
fr&|  S t | tjr7 fdd|  D S tdt|  d)Nc                      g | ]} |D ]}|qqS r#   r#   r   r   r0  _src_to_strr#   r$   r     r  z2list_deps.<locals>._src_to_str.<locals>.<listcomp>zInvalid file type r1   )r   r   r   Fileabsolute_path
source_dirr   r   CustomTargetCustomTargetIndexGeneratedListr   StructuredSourcesas_listMesonBugExceptionr   )rL  rQ  r:   r#   r$   rQ    s   
zlist_deps.<locals>._src_to_strr   r   varnameT.Optional[str]r   c                   s   | j | j|  |  |  fdd|  D  fdd|  D  fdd|  D dd | jD dd t	| dg D |rC|gdS g dS )	Nc                   s&   g | ]}|  j jD ]}|qqS r#   )to_string_listrT  r   )r   Zidirsr   )r:   r#   r$   r     s   & z5list_deps.<locals>._create_result.<locals>.<listcomp>c                   rN  r#   r#   rO  rP  r#   r$   r     r  c                   rN  r#   r#   rO  rP  r#   r$   r     r  c                 S  r   r#   r   )r   er#   r#   r$   r     r   c                 S  r   r#   r   r   r#   r#   r$   r     r   	libraries)r   r   rA  compile_args	link_argsinclude_directoriesr   r   rN   r   meson_variables)
r   	type_nameget_versionget_compile_argsget_link_argsget_include_dirsget_sourcesget_extra_filesext_depsr   )r   r\  r[  r#   r$   _create_result  s   z!list_deps.<locals>._create_resultrd  )rL  rM  r   r'   r@   )r   r   r\  r]  r   r   )depsr=  valuesfoundr   rJ   	variablesr{   r   r   held_objectr   Tcastr   r   )r	   r:   r   rm  r   r\  Zholderr#   r[  r$   rO     s    

rO   r^   "T.List[backends.TestSerialisation]ET.List[T.Dict[str, T.Union[str, int, T.List[str], T.Dict[str, str]]]]c                 C  s   g }| D ]b}i }t |jtr|jg}n|j}||j |d< t |jtjr-|ji |d< n|j|d< |j|d< |j	|d< |j
|d< |j|d< |j|d< |j|d< t|j|d	< |j|d
< |j|d< || q|S )Ncmdenvr   workdirtimeoutsuiteis_parallelpriorityprotocolr   extra_paths)r   r   r   cmd_argsrx  r   EnvironmentVariablesget_envr   ry  rz  r{  r|  r}  r~  r   r  r   )r^   r   r   tor   r#   r#   r$   get_test_list  s*   









r  c                 C     t | S r@   r  r]   r#   r#   r$   r\     r)   r\   	benchdatac                 C  r  r@   r  )r  r#   r#   r$   rA     r)   rA   ,T.Dict[str, T.Dict[str, T.Union[str, bool]]]c                 C  s\   i }dD ]'}t | jj|}t|||< |j|| d< | || d< | || d< q|S )N)r=  r   r   	is_64_bitZ
exe_suffixZobject_suffix)r   r   rU   dataclassesasdictr  get_exe_suffixget_object_suffix)r8   rU   mr  r#   r#   r$   rV     s   rV   3T.Dict[str, T.Union[str, T.List[T.Dict[str, str]]]]c                 C  sT   | j | j| jd}g }| j D ]\}}||| j|d}|| q||d< |S )N)rA  descriptive_namesubproject_dir)r   rA  r  r   )project_versionproject_namer  r   r{   projectsr   r   )r8   r   r   r  r  cr#   r#   r$   rX     s   
rX   c                   s   | j }t|}dd |D }| jd D ] }tj| j|d   fdd|D |d<  fdd|D }q|| jd< | j| jd< | jS )	Nc                 S  s   g | ]}t j|qS r#   )r    r!   r   r   r#   r#   r$   r     s    z-list_projinfo_from_source.<locals>.<listcomp>r   r   c                   s   g | ]	}|  r|qS r#   
startswithr   Zbasedirr#   r$   r     r   rH   c                   s   g | ]	}|  s|qS r#   r  r   r  r#   r$   r     r   r  )r   r:  r   r    r!   r"   r  )r   	sourcedirr9  r   r#   r  r$   rf     s   
rf   r  argparse.Namespaceresults6T.Sequence[T.Tuple[str, T.Union[dict, T.List[T.Any]]]]rv   T.Optional[int]intc                 C  sz   |s| j std dS t|dkr#| j s#ttj|d d |d dS i }|D ]
}|d ||d < q'ttj||d dS )NzNo command specifiedr   r   )rv   )rw   printlenjsondumps)r  r  rv   outr   r#   r#   r$   print_results  s   
r  rx   r]  c                 C  s   d}| d urt j| |}|S )Nz
meson-infor   )rx   infodirr#   r#   r$   get_infodir  s   r  r  kindc                 C  s    t j| |s	dS d| dS )Nr   intro-.jsonr   )r  r  r#   r#   r$   get_info_file  s
   
r  T.Anyc                 C  s@   t t| |dd}t|W  d    S 1 sw   Y  d S )Nutf-8encoding)openr  r  load)r  r  fpr#   r#   r$   load_info_file  s   $r  c              
   C  sX  d}t | j}| jd urtj| j|}| jrdnd }g }| jdkr$dn| jd d }t }dtj| j| jfv rtt	j
' t| j}|d usLJ t|d|jt t t gd}|  W d    n1 siw   Y  | D ]\}	}
| jst| |	dr|
jsqr||	|
|fg7 }qrt| ||S zt|}|d	i d
i dd}W n& ty   tj|rtj|std Y dS tdt| Y dS w t  }|D ]}t!"||std|d|  dS q| D ]6\}}|j#sq| jst| |dsqz||t||fg7 }W q ty%   tdt|| Y  dS w t| ||S )Nzmeson-private   r.  r1   i )visitorsFintrospectionrA  fullz0.0.0zyCurrent directory is not a meson build directory.
Please specify a valid build dir or change the working directory to it.zIntrospection file {} does not exist.
It is also possible that the build directory was generated with an old
meson version. Please regenerate it in this case.r   zFIntrospection version {} is not supported. The required version is: {}z and z%Introspection file {} does not exist.)$r  rx   r    r!   r"   rv   ri   r   r   sysstderrr   Zget_backend_from_namer:   r
   r   r   r   r   analyzer{   ru   r   r.   r  r  r   FileNotFoundErrorisdirr  formatr  r(   r   version_comparer,   )r  datadirr  rv   r  r  r   r:   r   r   r   rawZ
intro_versZvers_to_checkr   r  r#   r#   r$   run  sh   


 

r  updated_introspection_files
intro_infoc              	   C  s   | D ]B\}}t j|d| d}t j|d}t|ddd}t|| |  W d    n1 s4w   Y  t || t	| qd S )Nr  r  tmp_dump.jsonwr  r  )
r    r!   r"   r  r  dumpflushr|   r  r   )r  r   r  r   out_filetmp_filer  r#   r#   r$   write_intro_infoX  s   
r  c                 C  sZ   | j  }t|| |d}g }| D ]\}}|jsq||| fg7 }qt|| j j d S )Nrh   )r   get_coredatari   r{   r,   r  r   )r8   r:   r	   r   r  r   r   r#   r#   r$   generate_introspection_fileb  s   
r  c                 C  s   dt | fg}t|| d S )NrE   )rF   r  )r	   r   r  r#   r#   r$   update_build_optionsn  s   
r  rA  T.Dict[str, T.Union[str, int]]c                 C  sf   |  d}| tt|dkr|d ndtt|dkr|d ndtt|dkr.|d dS ddS )Nr1   r   r      )r  majorminorpatch)splitr  r  )rA  Z	vers_listr#   r#   r$   split_version_stringu  s   
r  Ferrorsr   build_files_updatedboolc                 C  s
  | j j}t|}t }i }| D ]\}}|jsqd| d|tv d||< qttj	| j 
 | j  |dtt |d|d}	|rQd|	d< d	d
 |D |	d< nd|	d< tj|d}
t|
ddd}t|	| |  W d    n1 sxw   Y  t|
| d S )Nr  r  )fileupdated)sourcer   info)rA  Zinformation)Zmeson_versionZdirectoriesr  r  Terrorc                 S  s"   g | ]}t |tr|nt|qS r#   )r   r   r   r#   r#   r$   r     s   " z)write_meson_info_file.<locals>.<listcomp>Z
error_listFr  r  r  r  )r   r   r%   ri   r{   r,   r  r  r   rA  r   r   r&   r    r!   r"   r  r  r  r  r|   )r8   r  r  r   Z	info_filer   r  r   r  Z	info_datar  r  r#   r#   r$   write_meson_info_file~  s<   

r  )r   r   r   r   )r   r   )r   r'   )NNN)r	   r7   r8   r9   r:   r;   r   r<   )rj   rk   r   r0   )r   r
   r   r   )rS   r   r   r   )rS   r   r   r   )r	   r   r   r   r   r   )r   r
   r   r   )r8   r   rS   r   r:   r   r   r   )r   r
   r   r   r@   )r	   r   r   r   r   r   )r   r   r   r'   )r8   r   rJ   r   r   r'   )r	   r   r   r<  )r   r
   r   rG  )r	   r   r:   r   r   rK  )r^   ru  r   rv  )r  ru  r   rv  )r8   r   r   r  )r8   r   r   r  )r   r
   r   r  )r  r  r  r  rv   r  r   r  )rx   r]  r   r   )r  r   r  r]  r   r   )r  r   r  r]  r   r  )r  r  r   r  )r  r  r   r   r   r0   )r8   r   r:   r   r   r0   )r	   r   r   r   r   r0   )rA  r   r   r  )F)r8   r   r  r   r  r  r   r0   )Q
__future__r   
contextlibr   ra   r  r  r    pathlibr   r   r  typingrs  r  r   r   r	   r   r=   r
   r   r   r   r   r   r:   r   rN   r   r   interpreterbaser   r   mparserr   r   r   r   TYPE_CHECKINGargparserJ   r   r   r%   r&   r(   r*   ri   r   rc   rQ   rT   r   rg   rZ   rd   rF   r:  rI   rM   re   rO   r  r\   rA   rV   rX   rf   r  r  r  r  r  r  __annotations__r  r  r  r  r  r#   r#   r#   r$   <module>   sz    


	




(

5
7
9
	



,







;




	