o
    )Ti                    @   s  d 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mZmZmZ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mZmZ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+m,Z,m-Z- ddl.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6m7Z7 ddl8m9Z9m:Z:m;Z;m<Z<m=Z= ddl>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZG ddlHmIZImJZJmKZKmLZLmMZMmNZN ddlOmPZP ddlQmRZR ddlSmTZT ddlUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z] ddl^m_Z_m`Z` ddlambZbmcZcmdZdmeZemfZfmgZgmhZh ddgZidejejkjljmv ZnG dd deTejoZpG dd depejqZrG dd de+epe7eejkZkdd l*msZs d!ejtvrHes  dS dS )"z$Extensions of core argparse classes.    N)Sequence)suppress)AnyCallableNoReturnOptionalUnion   )ActionConfigFileActionParser_ActionConfigLoad_ActionPrintConfig_is_action_value_listfilter_non_parsing_actionsprevious_config)InstantiatorCallableInstantiatorsDictTypeLoggerPropertyclass_instantiatorsdebug_mode_active$get_optionals_as_positionals_actionsis_subclasses_disabledlenient_checkparser_context!supports_optionals_as_positionalsvalidate_default)argcomplete_namespacehandle_completions)get_completion_script)ParserDeprecationsdeprecated_skip_checkdeprecated_yaml_comments)DefaultHelpFormatterget_env_var)ActionJsonnet)ActionJsonSchema)
ActionLinkArgumentLinking)check_valid_dump_formatdump_using_formatget_loader_exceptions
load_valueloaders)		Namespace
NSKeyErroris_meta_keypatch_namespacerecreate_branchesremove_meta	split_keysplit_key_leafsplit_key_root)_get_config_read_modefsspec_supportimport_fsspecimport_jsonnetomegaconf_applypyyaml_available)UnknownDefault)change_to_path_dir)SignatureArguments)ActionSubCommandsfind_actionfind_action_and_subcommand!find_parent_action_and_subcommandget_subcommandhandle_subcommandsis_branch_keyparse_kwargs_context)ActionTypeHintis_subclass_spec)	ClassTypePathargument_errorget_argument_group_classget_private_kwargsidentityreturn_parser_if_capturedActionsContainerArgumentParser
intermixedc                       s   e Zd ZU dZed ed< d fddZdd	d
ef fddZddde	e
 ddfddZdee
ef deddfddZ  ZS )rP   zRExtension of ``argparse._ActionsContainer`` to support additional functionalities.ArgumentGroup_action_groupsreturnNc                    s@   t  j|i | | ddt | ddt | ddt dS )z*Initializer for ActionsContainer instance.typeNactionparsersconfig)super__init__registerrN   r?   r
   selfargskwargs	__class__ F/home/ubuntu/.local/lib/python3.10/site-packages/jsonargparse/_core.pyr[   r   s   zActionsContainer.__init__F)enable_pathre   c                   s  t | dr| jn| }|ddur(t||d r t|||S t| |d  d|v r^t|d rK|d 	d}| j
|d|fi | t||S t|d r^tj|||t | jd}d|v rst|d ttfsst|d |d< t j|i |}| j|_t| | t|| t|jrtd	|j d
|jg krd|v r|d tjur|j dvrtdt!| | |j"r|j#$|j d|_%d|_"|S )a  Adds an argument to the parser or argument group.

        All the arguments from `argparse.ArgumentParser.add_argument
        <https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_argument>`_
        are supported. Additionally it accepts:

        Args:
            enable_path: Whether to try parsing path/subconfig when argument is a complex type.
        parserrW   NrV   r   -)r_   r`   re   	containerloggerchoicesz Argument with destination name "z" not allowed.default)*?z9Positional arguments not allowed to have a default value.TF)&hasattrrf   getr   _is_valid_action_parser_move_parser_actionsr
   _ensure_single_config_argumentr   lstripadd_class_argumentspopr@   rG   is_supported_typehintprepare_add_argumentrZ   _logger
isinstancelisttupleadd_argumentri   _add_print_config_argumentr$   _check_ext_vars_actionr/   dest
ValueErroroption_stringsargparseSUPPRESSnargsr   requiredrequired_argsadd	_required)r^   re   r_   r`   rf   
nested_keyrW   ra   rc   rd   r|   y   sJ   





zActionsContainer.add_argument)namer   c                O   s   t | dr| jn| }|dur||jv rtd| dt|dt}||g|R d|ji|}||_|j| |durA||j|< |S )a  Adds a group to the parser.

        All the arguments from `argparse.ArgumentParser.add_argument_group
        <https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_argument_group>`_
        are supported. Additionally it accepts:

        Args:
            name: Name of the group. If set, the group object will be included in the ``parser.groups`` dict.

        Returns:
            The group object.

        Raises:
            ValueError: If a group with the same name already exists.
        rf   NzGroup with name z already exists._group_classri   )	rn   rf   groupsr   getattrrS   rx   rT   append)r^   r   r_   r`   rf   group_classgrouprc   rc   rd   add_argument_group   s   
z#ActionsContainer.add_argument_groupr_   r`   c                    s   |D ]T}|  D ]M\ } dd t|  }|du r#td  dt|tr-t  nt|trC fdd|  D }| | qt|t	rM|
|}| | j < |_qq|r`| | dS dS )a"  Sets default values from dictionary or keyword arguments.

        Args:
            *args: Dictionary defining the default values to set.
            **kwargs: Sets default values based on keyword arguments.

        Raises:
            KeyError: If key not defined in the parser.
        rg   _NNo action for key "z" to set its default.c                    s    i | ]\}}  d | |qS .rc   .0kvr   rc   rd   
<dictcomp>   s     z1ActionsContainer.set_defaults.<locals>.<dictcomp>)itemsreplacer@   r.   ry   r
   set_default_errorr   set_defaultsrG   normalize_default	_defaultsrk   )r^   r_   r`   argrk   rW   rc   r   rd   r      s&   







zActionsContainer.set_defaultsrU   N)__name__
__module____qualname____doc__r   __annotations__r[   boolr|   r   strr   dictr   r   __classcell__rc   rc   ra   rd   rP   m   s   
 2&c                   @   s:   e Zd ZU dZdZee ed< dZee	de
f  ed< dS )rS   zKExtension of argparse._ArgumentGroup to support additional functionalities.Nr   rQ   rf   )r   r   r   r   r   r   r   r   rf   r   rP   rc   rc   rc   rd   rS      s   
 rS   c                       sv  e Zd ZU dZeej ed< dZe	e
eef  ed< ee ed< dZe	e ed< dZe	e ed< dedd	dd
er:dndddd	d
deeef deej dedeejeee
f de	e de	e dede	ee  de	eeeejf   deddf fddZdddZdd Z fddZ					dd ed!e	e d"ed#ed$ed%ed&edefd'd(Z			dd"ed!e	e d)e	ee
eef ej f  fd*d+Z!				dd,e	e"e  d-e	e d!e	e d"edef
d.d/Z#			dd0eee
ee$f f d1e	e d!e	e d"edef
d2d3Z%d!ee
eef ej f d"edefd4d5Z&		dd!e	e
eef  d"edefd6d7Z'			dd8eeejf d9e	e
 d!e	e d"edef
d:d;Z(	<			dd=ed8eeejf d9e	e
 d!e	e d"edefd>d?Z)	<		dd=ed8eeejf d9e	e
 d@e	e def
dAdBZ*de+fdCdDZ,ddFedGedef fdHdIZ-									dd edJedKedLed#edMedNedefdOdPZ.ddQdRZ/dSdT Z0								dd edUeeejf dJedKed#edVedWedXe	e ddfdYdZZ1dee2 fd[d\Z3dGede$fd]d^Z4dd#edefd_d`Z5de+fdadbZ6ddcddZ7deedefdfdgZ8ddhedie	e9 de+fdjdkZ:				dd edKed$edXe	e ddf
dldmZ;			ddne<doee= dpedqeddf
drdsZ>dtdu Z?	dd edvedefdwdxZ@d edefdydzZAd edee fd{d|ZBdef fd}d~ZCd fddZD	<		dd eee
ee$f f ded@e	e de	eEe$gef  def
ddZFdededefddZG		ddejHde$ded e	e dede$fddZIeJdee fddZKeKjLde	e"eeejf   fddZKeJdefddZMeMjLdefddZMeJdeeef fddZNeNjLdeeef fddZNeJdefddZOeOjLdefddZOeJde	ee  fddZPePjLde	ee  fddZP  ZQS )rQ   zGParser for command line, configuration files and environment variables.formatter_classNr   r   _subcommands_action_instantiatorsTFz--print_configyamljson)

env_prefixr   exit_on_errorri   versionprint_configparser_modedump_headerdefault_config_filesdefault_envr   r   ri   r   r   r   r   r   r   rU   c       
            s   t  j|||d| t| | _| jdu ri | _|| _t | _t | _|	| _	|
| _
|| _|| _|| _|| _|durG| jddd| dd dS dS )aB  Initializer for ArgumentParser instance.

        All the arguments from the initializer of `argparse.ArgumentParser
        <https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser>`_
        are supported. Additionally it accepts:

        Args:
            env_prefix: Prefix for environment variables. ``True`` to derive from ``prog``.
            formatter_class: Class for printing help messages.
            logger: Logger to use or configuration for logger.
            version: Program version which will be printed by the ``--version`` argument.
            print_config: Name for print config argument, ``%s`` is replaced by config dest, set ``None`` to disable.
            parser_mode: Mode for parsing values: ``yaml``, ``json``, ``jsonnet`` or added via :func:`.set_loader`.
            dump_header: Header to include as comment when dumping a config object.
            default_config_files: Default config file locations, e.g. ``['~/.config/myapp/*.yaml']``.
            default_env: Set the default value on whether to parse environment variables.
        )r   ri   Nz	--versionr   z	%(prog)s zPrint version and exit.)rW   r   help)rZ   r[   rL   r   r   r   setr   save_path_contentr   r   r   r   r   _print_configr|   )r^   r   r   r   ri   r   r   r   r   r   r   r_   r`   ra   rc   rd   r[      s$    


zArgumentParser.__init__c              
   C   s:  t t  d d }|du rdn|j}|dvrtdt|| |}z\t G t| dd1 t	|  i }t
r<d|d	< | j||fi |\}}W d   n1 sRw   Y  W d   n1 saw   Y  W d   n1 spw   Y  W ||fS W ||fS  tjy } z| t|| W Y d}~||fS d}~ww )
zXRaises ``NotImplementedError``, not supported since typos in configs would go unnoticed.r	   r   N>   argcompletejsonargparsezKparse_known_args not supported because typos in configs would go unnoticed.Tparent_parserr   FrR   )inspect	getmodulestack__package__NotImplementedErrorr   r0   r   rG   subclass_arg_context_parse_known_has_intermixed_parse_known_argsr   ArgumentErrorerrorr   )r^   r_   	namespace
caller_modcallerr`   exrc   rc   rd   parse_known_args'  s:   
  zArgumentParser.parse_known_argsc                 C   s   t |dks
t| s||fS t| ddD ]:}|jg kr4||jd u r3| jd|j d  ||fS q| ||	d|j|||j< t |dkrN ||fS q||fS )Nr   T)include_positionalszPositional argument z( missing, aborting _positional_optionals)
lenr   r   r   ro   r   rx   debug_check_value_keyru   )r^   cfgunkrW   rc   rc   rd   _positional_optionals?  s   
z$ArgumentParser._positional_optionalsc                    s0   t |}|r	|S || jkr|d7 }t |S )N=)rG   parse_argv_itemr   rZ   _parse_optional)r^   
arg_stringsubclass_argra   rc   rd   r   P  s   

zArgumentParser._parse_optionalr   envdefaultsskip_validationskip_requiredskip_subcommandsfail_no_subcommandc           	      C   s"  |du r	| j r	d}|st| ||||d |r1tdd t| | W d   n1 s,w   Y  t| dQ t sE| jdkrEt| |}t	
| | zt| | W n tym } z| t|| W Y d}~nd}~ww |s| j||d W d   |S W d   |S 1 sw   Y  |S )a  Common parsing code used by other parse methods.

        Args:
            cfg: The configuration object.
            env: Whether to merge with the parsed environment, ``None`` to use the parser's default.
            defaults: Whether to merge with the parser's defaults.
            skip_validation: Whether to skip validation of configuration.
            skip_required: Whether to skip check of required arguments.
            skip_subcommands: Whether to skip subcommand processing.
            fail_no_subcommand: Whether to fail if no subcommand given.

        Returns:
            A config object with all parsed values.
        NT)r   r   r   r   r   
omegaconf+)r   )_default_envrD   r   rG   add_sub_defaultsr   ro   r   r:   r   print_config_if_requestedr&   apply_parsing_links	Exceptionr   r   validate)	r^   r   r   r   r   r   r   r   r   rc   rc   rd   _parse_commonX  s6   


zArgumentParser._parse_commonenvironc                 C   s   t  }|r tdd | jdd}W d    n1 sw   Y  |s)|d u rS| jrS|d u r0tj}t| jd | j||d}W d    n1 sHw   Y  | ||}|S )NTr   r   load_value_moder   r   )	r-   r   get_defaultsr   osr   r   _load_env_varsmerge_config)r^   r   r   r   r   cfg_envrc   rc   rd   _parse_defaults_and_environ  s   z*ArgumentParser._parse_defaults_and_environr_   r   c              
   K   s  t |ddd\}}t|  t|  |du rtjdd }nt|}tdd |D s2| d|  || _z| 	||}|r|r{| j	|dd}| 
||}|sV|du rz| jrzt| jd	 | jtj|d
}	W d   n1 sow   Y  | 
|	|}n| 
||}t||d
 | j||d\}}
| ||
\}}
W d   n1 sw   Y  |
r| dd|
  | j||||d}W n tttjfy } z| t|| W Y d}~nd}~ww | jd| |S )a  Parses command line argument strings.

        All the arguments from `argparse.ArgumentParser.parse_args
        <https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_args>`_
        are supported. Additionally it accepts:

        Args:
            args: List of arguments to parse or ``None`` to use ``sys.argv``.
            env: Whether to merge with the parsed environment, ``None`` to use the parser's default.
            defaults: Whether to merge with the parser's defaults.

        Returns:
            A config object with all parsed values.

        Raises:
            ArgumentError: If the parsing fails and ``exit_on_error=True``.
        F)_skip_validation_namespace_as_configNr	   c                 s       | ]}t |tV  qd S Nry   r   r   arc   rc   rd   	<genexpr>      z,ArgumentParser.parse_args.<locals>.<genexpr>z*All arguments are expected to be strings: )r   r   r   )r_   r   zUnrecognized arguments:  )r   r   r   r   z!Parsed command line arguments: %s)rM   rO   r   sysargvrz   allr   r_   r   r   r   r   r   r   r   r   rF   r   r   joinr   	TypeErrorKeyErrorr   r   r   rx   r   )r^   r_   r   r   r   r`   r   namespace_as_configr   r   r   
parsed_cfgr   rc   rc   rd   
parse_args  sT   

zArgumentParser.parse_argscfg_objcfg_basec              
   K   s   t |ddd\}}z,| ||}|r| ||}| |}| j||d}	| |	|}| j|||||d}
W n ttfyQ } z| t|| W Y d}~nd}~ww | j	
d| |
S )a  Parses configuration given as an object.

        Args:
            cfg_obj: The configuration object.
            env: Whether to merge with the parsed environment, ``None`` to use the parser's default.
            defaults: Whether to merge with the parser's defaults.

        Returns:
            A config object with all parsed values.

        Raises:
            ArgumentError: If the parsing fails and ``exit_on_error=True``.
        F)r   _skip_requiredprev_cfg)r   r   r   r   r   NzParsed object: %s)rM   r   r   _apply_actionsr   r  r  r   r   rx   r   )r^   r  r  r   r   r`   r   r   r   	cfg_applyr	  r   rc   rc   rd   parse_object  s*   

zArgumentParser.parse_objectc              	   C   s  t  }t| j}|D ]}t| |}||v r%t|tr%t| ||j||  q
|D ]E}t| |}||v rmt|trm|| }||j	v rm| 
|||j| ||j< }|j| j||dd}	t|	 D ]\}
}|||d |
 < q`q(|D ]k}t| |}||v rt|ttfs|| }t|tjtjfr| }|dkrd}n5|dkrd}n.t|d| d| t|rzt|}t|tr|n|g}W n t y   |g}Y nw | 
|||j|||j< qp| | |S )	NT)r   r   r   r   truefalseFz/Invalid boolean value for environment variable z: )r-   r   _actionsr#   ry   r
   apply_configr   r?   rj   r   _name_parser_map	parse_envvarsr   r   _StoreTrueAction_StoreFalseActionlowerr   r   r+   rz   r*   r  )r^   r   r   r   actionsrW   env_varenv_val
subcommandpcfgr   r   env_val_lowerlist_env_valrc   rc   rd   r     sR   






zArgumentParser._load_env_varsc           	   
   K   s   t |ddd\}}z!| j|d|d}d|||d}|rd|d< | jd
d|i|}W n ttfyF } z| t|| W Y d}~nd}~ww | jd	 |S )at  Parses environment variables.

        Args:
            env: The environment object to use, if ``None`` then ``os.environ`` is used.
            defaults: Whether to merge with the parser's defaults.

        Returns:
            A config object with all parsed values.

        Raises:
            ArgumentError: If the parsing fails and ``exit_on_error=True``.
        F)r   _skip_subcommandsT)r   r   )r   r   r   r   r   r   NzParsed environment variablesrc   )	rM   r   r   r  r  r   r   rx   r   )	r^   r   r   r`   r   r   r   r	  r   rc   rc   rd   r  ;  s"   zArgumentParser.parse_envcfg_pathext_varsc           	   	   K   st   t |t d}t| | }| jd|tj||||d|}W d   n1 s,w   Y  | j	d| |S )a  Parses a configuration file given its path.

        Args:
            cfg_path: Path to the configuration file to parse.
            ext_vars: Optional external variables used for parsing jsonnet.
            env: Whether to merge with the parsed environment, ``None`` to use the parser's default.
            defaults: Whether to merge with the parser's defaults.

        Returns:
            A config object with all parsed values.

        Raises:
            ArgumentError: If the parsing fails and ``exit_on_error=True``.
        mode)cfg_strr%  r&  r   r   Nz"Parsed configuration from path: %src   )
rJ   r6   r=   get_contentparse_stringr   pathbasenamerx   r   )	r^   r%  r&  r   r   r`   fpathr)  r	  rc   rc   rd   
parse_pathc  s   

zArgumentParser.parse_path r)  c              
   K   s   t |ddd\}}z<t| jd | |||t }	W d   n1 s%w   Y  |s.|r:| ||}
| |	|
}	| j|	||||d}W n t	t
fya } z| t|| W Y d}~nd}~ww | jd| j| |S )a\  Parses configuration given as a string.

        Args:
            cfg_str: The configuration content.
            cfg_path: Optional path to original config path, just for error printing.
            ext_vars: Optional external variables used for parsing jsonnet.
            env: Whether to merge with the parsed environment, ``None`` to use the parser's default.
            defaults: Whether to merge with the parser's defaults.

        Returns:
            A config object with all parsed values.

        Raises:
            ArgumentError: If the parsing fails and ``exit_on_error=True``.
        FT)r   _fail_no_subcommandr   N)r   r   r   r   r   zParsed %s string: %s)rM   r   r   _load_config_parser_moder   ro   r   r   r   r  r  r   r   rx   r   )r^   r)  r%  r&  r   r   r`   r   r   r   r  r	  r   rc   rc   rd   r+    s.   

zArgumentParser.parse_stringr  c              
   C   sd   z	t |||d}W n t y } ztd| |d}~ww t|ts+td| | j||dS )av  Loads a configuration string into a namespace.

        Args:
            cfg_str: The configuration content.
            cfg_path: Optional path to original config path, just for error printing.
            ext_vars: Optional external variables used for parsing jsonnet.

        Raises:
            TypeError: If there is an invalid value according to the parser.
        )r,  r&  zProblems parsing config: NzUnexpected config: r  )r+   r*   r  ry   r   r  )r^   r)  r%  r&  r  cfg_dictr   rc   rc   rd   r2    s   
z'ArgumentParser._load_config_parser_modec                 K      t d)zMRaises a ``NotImplementedError`` since jsonargparse uses ``add_subcommands``.zGIn jsonargparse subcommands are added using the add_subcommands method.)r   )r^   r`   rc   rc   rd   add_subparsers  s   zArgumentParser.add_subparsersr   r   r   c                    sn   d|vrd|d< | j }g | _ t jdd|i|}|| _ |r$| j| ||_d|_| |_t| |_	|| _
|S )a  Adds subcommand parsers to the ArgumentParser.

        The aim is the same as `argparse.ArgumentParser.add_subparsers
        <https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers>`_
        the difference being that dest by default is ``subcommand`` and the parsed
        values of the subcommand are stored in a nested namespace using the
        subcommand's name as base key.

        Args:
            required: Whether the subcommand must be provided.
            dest: Destination key where the chosen subcommand name is stored.
            **kwargs: All options that `argparse.ArgumentParser.add_subparsers
                <https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers>`_ accepts.
        descriptionzNFor more details of each subcommand, add it as an argument followed by --help.r   FNrc   )r   rZ   r5  r   r   r   r   r   r#   r   r   )r^   r   r   r`   r   subcommandsra   rc   rd   add_subcommands  s   
zArgumentParser.add_subcommandsformat	skip_noneskip_defaultwith_commentsskip_link_targetsc                 K   s  t ||}ttj||}t| |jdd}t| jdI |s$| | |r,t	
| | ||d}	| || j|	 | }
|r^| jdd}t	
| | | || jd|d | |
|  W d   n1 shw   Y  t| d t| |
||d	W  d   S 1 sw   Y  dS )
as  Generates a serialized string for the given configuration object.

        Args:
            cfg: The configuration object to dump.
            format: The output format: ``yaml``, ``json``, ``json_indented``, ``toml``, ``parser_mode`` or ones added
                via :func:`.set_dumper`.
            skip_none: Whether to exclude entries whose value is ``None``.
            skip_default: Whether to exclude entries whose value is the same as the default.
            skip_validation: Whether to skip parser checking.
            with_comments: Whether to add help content as comments. Currently only supported for ``format="yaml"``.
            skip_link_targets: Whether to exclude link targets.

        Returns:
            The configuration in the chosen format.

        Raises:
            TypeError: If any of the values of cfg is invalid according to the parser.
        F	with_metar   )r   r:  Tr   Nr   )dump_formatr<  )r!   r    rQ   dumpr(   cloner   r   r   r&   strip_link_target_keys_dump_cleanup_actionsr  as_dictr   _dump_delete_default_entriesr)   )r^   r   r9  r:  r;  r   r<  r=  r`   dump_kwargsr3  r   rc   rc   rd   rA    s,   


$zArgumentParser.dumpc              
   C   sj  |d }t |D ]}||j }|jtjkrt|tr+t|ts+|r2||v r2|| d u r2||d  n.t|t	rV||d  |j
 D ]\}}	| j||	j||| d d qBn
t|tr`|jd }t|tr||}
|
d urt| dd0 |drtt |j|
|d}
W d    n1 sw   Y  n|j|
|d}
W d    n1 sw   Y  ||
| qd S )	Nr:  r   )prefixr	   Tr   r   )rG  )r   r   r   r   r   ry   r   r
   ru   r?   rj   r   rD  r  r&   targetrG   ro   r   r   r   	serializeupdate)r^   r   r  rG  rH  r:  rW   action_destkey	subparservaluerc   rc   rd   rD  2  s@   







z$ArgumentParser._dump_cleanup_actionsc              	   C   s   t | D ]q}||v rw|| }|| }d }t|rS|d |dkrGt| d t|d }W d    n1 s:w   Y  d|  i}|}|d}|d}||kr[||= qt	|t
rwt	|t
rw| || |rw|di krw|d= qd S )N
class_pathr   	init_args)rz   keysrH   ro   r   rG   get_class_parserr   rE  ry   r   rF  )r^   subcfgsubdefaultsrM  valrk   class_object_valrf   rc   rc   rd   rF  M  s,   

z+ArgumentParser._dump_delete_default_entriesr,  	overwrite	multifilebranchc	              	      sX  t tj|	|}t fdd ||d}
tr`zt|dd}W n	 ty*   Y n6w |jr`|r7td| t	d}|
|d}|j|fi |
 W d	   d	S 1 sYw   Y  d	S t|d
d} | |st
|jd}|j|fi |
 W d	   d	S 1 sw   Y  d	S | }|stjd j|jdd|d W d	   n1 sw   Y  t| fdd fdd fdd}t|! td || W d	   n1 sw   Y  W d	   n1 sw   Y  d|
d< t
|jd}|j|fi |
 W d	   d	S 1 s%w   Y  d	S )a  Writes to file(s) the given configuration object using the chosen format.

        Args:
            cfg: The configuration object to save.
            path: Path to the location where to save config.
            format: The output format: ``yaml``, ``json``, ``json_indented``, ``parser_mode`` or ones added via
                :func:`.set_dumper`.
            skip_none: Whether to exclude entries whose value is ``None``.
            skip_validation: Whether to skip parser checking.
            overwrite: Whether to overwrite existing files.
            multifile: Whether to save multiple config files by using the ``__path__`` metas.

        Raises:
            TypeError: If any of the values of cfg is invalid according to the parser.
        c                    s*    st j| jrtd| j d S d S )Nz%Refusing to overwrite existing file: )r   r,  isfileabsoluter   )r,  )rX  rc   rd   check_overwrite  s   z,ArgumentParser.save.<locals>.check_overwrite)r9  r:  r   swr'  z/multifile=True not supported for fsspec paths: ArgumentParser.savewNfcr   Fr>  )rZ  c                    s   t  | }t|ttttfS r   )r@   ry   r%   r$   rG   r   )rM  rW   r^   rc   rd   is_path_action  s   
z+ArgumentParser.save.<locals>.is_path_actionc                    s   t tj| d jdd} | t| }t| tr| }d| v r'| d }nt	|
 d}t||r7dn}t|jd}|| W d    n1 sPw   Y  tj|S )N__path__ra  r'  __orig__z.jsonjson_indentedr`  )rJ   r   r,  r-  r\  r2   ry   r-   rE  r   r  endswithr)   openwrite)rV  val_pathval_outval_stris_jsonf)r]  r9  r^   rc   rd   	save_path  s   

z&ArgumentParser.save.<locals>.save_pathc              	      s  |   D ]}| | }t|ttfr d|v r |r|| |< qt|trD|rCt|D ]\}}t|ttfrBd|v rB|||< q-qt|tr|jv rd|jv rtt	j
|jdd} | t|jd}||  W d    n1 szw   Y  t|t|| |< qd S )Nrd  rra  r'  r`  )get_sorted_keysry   r-   r   rz   	enumeraterJ   r   r(  r   r,  r-  r\  rh  ri  r*  rV   r   )r   rM  rV  numitemrj  rn  )r]  rc  ro  r^   rc   rd   
save_paths  s*   
z'ArgumentParser.save.<locals>.save_pathsr   Tr   )r    rQ   saver(   r7   rJ   r  	is_fsspecr   r8   rh  ri  rA  r\  rB  r   r   r   r&   rC  r=   )r^   r   r,  r9  r:  r   rX  rY  rZ  r`   rG  path_swfsspecrn  path_fcru  rc   )r]  r9  rc  rX  ro  r^   rd   rv  b  sX   
"
 $r_  c                 C   s   t | ddrg S g }| jD ]}|tttj|7 }qt|dkr>tt	 dd |D W  d    S 1 s9w   Y  g S )N_inner_parserFr   c                 S   s   g | ]	}t |t d qS )r'  )rJ   r6   )r   r   rc   rc   rd   
<listcomp>      z<ArgumentParser._get_default_config_files.<locals>.<listcomp>)
r   r   sortedglobr   r,  
expanduserr   r   r  )r^   r   patternrc   rc   rd   _get_default_config_files  s   

 z(ArgumentParser._get_default_config_filesc                    sv   t | \ } du s jkrtd d fdd}|  s)|   jS |  } j|vr5|  | jS )zGets a single default value for the given destination key.

        Args:
            dest: Destination key from which to get the default.

        Raises:
            KeyError: If key or its default not defined in the parser.
        Nr   z" to get its default.c                      s     j tjkrtd dd S )NzAction for key "z" does not specify a default.)rk   r   r   r.   rc   rW   r   rc   rd   check_suppressed_default  s   z<ArgumentParser.get_default.<locals>.check_suppressed_default)rB   r   r.   r  rk   r   ro   )r^   r   r   r  r   rc   r  rd   get_default  s   	
zArgumentParser.get_defaultc                 K   s
  t tj||}t }t| jD ]}|jtjkr+|j	tjkr+t
|jts+t|j||j	< q| jd| |  }|D ]}| }| sDq9t|o t| ddY | j||d}| ||}z!t  | j|dd|ddd}W d   n1 sxw   Y  W n" tttjfy }	 ztd| d	|	jd
  t|d|	d}	~	ww W d   n1 sw   Y  W d   n1 sw   Y  |d}
t
|
t r|
!| nt
|
t"r|
|g|d< n||d< | jd| q9tdd t#$| | W d   |S 1 sw   Y  |S )zReturns a namespace with all default values.

        Args:
            skip_validation: Whether to skip validation of defaults.

        Returns:
            An object with all default values as attributes.
        zLoaded parser defaults: %sT)r   parsing_defaultsr  F)r   r   r   r   r   r   Nz Problem in default config file 'z': r   )default_config_file__default_config__z*Parsed default configuration from path: %s)validating_defaults)%r    rQ   r   r-   r   r  rk   r   r   r   ry   r<   r1   rx   r   r  r*  stripr=   r   r2  r   r   skip_print_configr   r  r  r   rK   r_   r   ro   rz   r   rJ   rG   r   )r^   r   r`   r   rW   r   r  default_config_file_contentcfg_filer   metarc   rc   rd   r     sp   	

	 



zArgumentParser.get_defaultsc                 O   r4  )NznParser instance was invalidated by get_completion_script() and cannot be reused. Create a new parser instance.)r   r]   rc   rc   rd   '_raise_invalidated_by_completion_script5  s   z6ArgumentParser._raise_invalidated_by_completion_scriptc                 C   sZ   t | D ]&}|drqt| |d }t|r*t| |d }t|r*t| || j qd S )Nr   )	dir
startswithr   getattr_static	isroutiner   ismethodsetattrr  )r^   r   static_attrattrrc   rc   rd    _invalidate_by_completion_script;  s   


z/ArgumentParser._invalidate_by_completion_scriptcompletion_typec                 K   s   t | |fi |}|   |S )z6Returns shell completion script for a completion type.)get_completion_script_internalr  )r^   r  r`   completion_scriptrc   rc   rd   r   E  s   z$ArgumentParser.get_completion_scriptmessager   c                 C   s   | j | t| jr| | | | jst||t r'| j d t||t|ddp.| }t|ddr8g |_	|
tj tdd |jD d}|rb|jdd}tjd	| d
|jd  d tjd| d | d dS )zTLogs error message if a logger is set and exits or raises an :class:`ArgumentError`.z6Debug enabled, thus raising exception instead of exit.subcommand_parserNr  c                 s   s     | ]}t |tjr|V  qd S r   )ry   r   _HelpActionr   rc   rc   rd   r   ]  s    z'ArgumentParser.error.<locals>.<genexpr>z
 [options]r0  z*tip: For details of accepted options run: r  
zerror:    )rx   r   callable_error_handlerr   rK   r   r   r   r   print_usager  stderrnextr  progr   ri  r   exit)r^   r  r   rf   help_actionr  rc   rc   rd   r   M  s$   


 zArgumentParser.errorc           	         s   t |dd}|  } t|tr|}t }|||< fdd fdd}tjd || W d   n1 s=w   Y  |sPt sR|| dS dS dS )	a	  Checks that the content of a given configuration object conforms with the parser.

        Args:
            cfg: The configuration object to check.
            skip_none: Whether to skip checking of values that are ``None``.
            skip_required: Whether to skip checking required arguments.
            branch: Base key in case cfg corresponds only to a branch.

        Raises:
            TypeError: If any of the values are not valid.
            KeyError: If a key in cfg is not defined in the parser.
        r0  _prefixc                    s   |j D ]'}z| | }|d u rtW q ttfy* } ztd| | d|d }~ww t|| dd\}}|d urK|d urM | |||| d  d S d S d S )NOption 'z4' is required but not provided or its value is None.Fr   r   )r   r  r  rC   ro   )r   rf   rH  reqkeyrV  r   r   rN  )check_requiredrc   rd   r    s$   
z/ArgumentParser.validate.<locals>.check_requiredc           
         s   fdd|   D }| D ]\ }d }|d u rEt rqt td\}}|rE|r3|d |j n|j} |d rE|||u rEq|   }|d ur|d u rSsWt rXqz
	||  W q t
y } z|i krxt|rx jvsz|W Y d }~qd }~ww t|trd v rt \}}td| d| d}|j| |_|t fdd	jD d }	|	rˈ t|	d
 d  }td|	 d| djr| jjrd| jj  d}ndtjjd  d}td  d| td  dd S )Nc                    s   i | ]}|t  |qS rc   )r@   r   r   rb  rc   rd   r         zAArgumentParser.validate.<locals>.check_values.<locals>.<dictcomp>excluder   zSubcommand 'z' does not accept option ''c                 3   s"    | ]}  |d  r|V  qdS )r   N)r  r   grM  rc   rd   r     s     z@ArgumentParser.validate.<locals>.check_values.<locals>.<genexpr>r	   zGroup '{r   z,...}r  z$' is not accepted before subcommand z' is not accepted)rq  r   rE   rB   r   r   r  ro   r   r   r  rG   is_subclass_typehintr   ry   r?   r5   r.   r  r  r  r   r   r   rz   rj   )
r   sorted_keysrW   parent_actionr   
parent_keyrV  r   subkey	group_key)ccfgr^   r:  r  rd   check_values  sN   
z-ArgumentParser.validate.<locals>.check_valuesr   N)	rM   rB  ry   r   r-   r   r   r   ro   )	r^   r   r:  r   rZ  r`   rH  
branch_cfgr  rc   )r  r  r^   r:  rd   r   e  s   
*
zArgumentParser.validateinstantiator
class_type
subclassesprependc                    sX   | j du ri | _ ||f  fdd| j  D }|r# |i|| _ dS || < || _ dS )a  Adds a custom instantiator for a class type. Used by ``instantiate_classes``.

        Instantiator functions are expected to have as signature ``(class_type:
        Type[ClassType], *args, **kwargs) -> ClassType``.

        For reference, the default instantiator is ``return class_type(*args,
        **kwargs)``.

        In some use cases, the instantiator function might need access to values
        applied by instantiation links. For this, the instantiator function can
        have an additional keyword parameter ``applied_instantiation_links:
        dict``. This parameter will be populated with a dictionary having as
        keys the targets of the instantiation links and corresponding values
        that were applied.

        Args:
            instantiator: Function that instantiates a class.
            class_type: The class type to instantiate.
            subclasses: Whether to instantiate subclasses of ``class_type``.
            prepend: Whether to prepend the instantiator to the existing instantiators.
        Nc                    s   i | ]\}}| kr||qS rc   rc   r   r  rc   rd   r         z3ArgumentParser.add_instantiator.<locals>.<dictcomp>)r   r   )r^   r  r  r  r  instantiatorsrc   r  rd   add_instantiator  s   

zArgumentParser.add_instantiatorc                    sv   | j pi  t| dr!| j }     fdd| D  t }|r9     fdd| D   S )Nr   c                       i | ]\}}| vr||qS rc   rc   r   r  rc   rd   r     r  z5ArgumentParser._get_instantiators.<locals>.<dictcomp>c                    r  rc   rc   r   r  rc   rd   r     r  )	r   rn   r   _get_instantiatorscopyrK  r   r   ro   )r^   parent_instantiatorscontext_instantiatorsrc   r  rd   r    s   


z!ArgumentParser._get_instantiatorsinstantiate_groupsc              
      s  g }t | jD ]"}t|tr|| qt|tr)t|jd tr)||jd  q|rBdd |D   fdd| jD }|| |j	dd d t
| }t||}|jd	d
}|D ]w}tj| ||jd t|trz||j\}}	}
W n ttfy   Y q]w |durt| t| ||  |dd |||	|
< W d   n1 sw   Y  q]t| j|  |dd ||| W d   n1 sw   Y  q]tj| ||d t| |d	d\}}|dur|dur|j|| |d||< |S )a`  Recursively instantiates all subclasses defined by ``class_path``+``init_args`` and class groups.

        Args:
            cfg: The configuration object to use.
            instantiate_groups: Whether class groups should be instantiated.

        Returns:
            A configuration object with all subclasses and class groups instantiated.
        r	   c                 S   s   h | ]}|j qS rc   r   )r   crc   rc   rd   	<setcomp>  s    z5ArgumentParser.instantiate_classes.<locals>.<setcomp>c                    s$   g | ]}t |d r|j vr|qS )instantiate_class)rn   r   r  skiprc   rd   r|    s   $ z6ArgumentParser.instantiate_classes.<locals>.<listcomp>c                 S   s   t t| j S r   )r   r3   r   )xrc   rc   rd   <lambda>	  s    z4ArgumentParser.instantiate_classes.<locals>.<lambda>r  Fr>  )rI  N__applied_instantiation_links__)r   nested_linksr   applied_instantiation_links)r   r   r  )orderr  )r  )r   r  ry   rG   r   r&   rI  rT   extendsortinstantiation_orderreorderrB  apply_instantiation_linksr   get_value_and_parentr  AttributeErrorr   get_nested_linksr  ro   instantiate_classesr   r  rC   )r^   r   r  
componentsrW   r   r  	componentrO  parentrM  r   rN  rc   r  rd   r    s\   




z"ArgumentParser.instantiate_classesc                 C   sN   |  }g }| D ]}t| |du rt|s|| q
|D ]}||= q|S )zRemoves all unknown keys from a configuration object.

        Args:
            cfg: The configuration object to strip.

        Returns:
            The stripped configuration object.
        N)rB  rR  r@   r/   r   )r^   r   del_keysrM  rc   rc   rd   strip_unknown.  s   	
zArgumentParser.strip_unknownc                 C   sj   g }d|v r| |d  t| jD ] }t|tr2|j|v r2||j dur2|dd ||j D  q|S )zReturns a list of loaded config file paths.

        Args:
            cfg: The configuration object.

        Returns:
            Paths to loaded config files.
        r  Nc                 s   s    | ]	}|d ur|V  qd S r   rc   )r   prc   rc   rd   r   Q  s    z2ArgumentParser.get_config_files.<locals>.<genexpr>)r   r   r  ry   r
   r   r  )r^   r   	cfg_filesrW   rc   rc   rd   get_config_filesC  s   	"zArgumentParser.get_config_filesc              
      s   d }t | jdkrOd}z|  }d|v r)|d }t|tr$dd |D }d| }W n tjyB } zd| }W Y d }~nd }~ww | j}| j d| |_t	| |d	 t
  }W d    |S 1 sfw   Y  |S )
Nr   z&no existing default config file found.r  c                 S   s   g | ]}t |qS rc   )r   r   r  rc   rc   rd   r|  ]  s    z.ArgumentParser.format_help.<locals>.<listcomp>zAdefault values below are the ones overridden by the contents of: zKtried getting defaults considering default_config_files but failed due to: z, Note: )r   defaults_cache)r   _default_config_filesr   ry   rz   r   r   _default_config_files_groupr6  r   rZ   format_help)r^   r   noteconfig_filesr   r   help_strra   rc   rd   r  T  s.   


zArgumentParser.format_helpc                    s@   t | d t j|i |W  d    S 1 sw   Y  d S )Nr   )r   rZ   r  r]   ra   rc   rd   r  g  s   $zArgumentParser.print_usager  skip_fnc                    s  t  tr	t  r# }t  | < fdd|jdddD n	t jddd|r3| }nt }t }d}|tk rY| |v rLtnd}t	| |d\}	}
t |	t
r|	jrd| vrd| g fd	d|d D  q;|d
7 }|	du st |	tr  }t |trt|}t |tr|jddd}fdd|D 7 | < q;|
du r|	jn|
d |	j }d}| vrوdrd}  |<  | }|r||rq;t| dd | j|	||||d}W d   n1 sw   Y  t |	tr|| | n:t |	trDt |trC | t fdd|d D }t|  ||  | q;nt|	ddrO|||< | |< |tk sBr`  S  S )z3Runs _check_value_key on actions present in config.c                    s   g | ]} d  | qS r   rc   r  )r  rc   rd   r|  y  r  z1ArgumentParser._apply_actions.<locals>.<listcomp>TF)branchesnestedr   Nr  c                    s   g | ]}| kr|qS rc   rc   r  )ext_vars_keyrc   rd   r|    r  r	   c                    s(   g | ]} d  | vr d  | qS r   rc   r  )rM  rR  rc   rd   r|    s   ( r   +r   )r   c                    s   i | ]}| | qS rc   rc   r  )r   rc   rd   r         z1ArgumentParser._apply_actions.<locals>.<dictcomp>jsonnet_ext_vars)ry   r   r-   rR  rz   rB  r   r   r   rA   r$   	_ext_varsr?   r   rg  ru   r   r   r   r   r
   r   r  rK  r   )r^   r   r  r  r  
cfg_branchconfig_keysrs  r  rW   r   rO  new_keysrL  r   preserverc   )r   r  rM  rR  r  rd   r  k  sv   


,




.zArgumentParser._apply_actionscfg_fromcfg_toc                 C   sV   |  }|  }t| d t| || W d   n1 sw   Y  || |S )a  Merges the first configuration into the second configuration.

        Args:
            cfg_from: The configuration from which to merge.
            cfg_to: The configuration into which to merge.

        Returns:
            A new object with the merged configuration.
        r   N)rB  r   rG   &discard_init_args_on_class_path_changerK  )r^   r   r  rc   rc   rd   r     s   

zArgumentParser.merge_configrW   rO  rM  r   c              
   C   s  |du r
t  r
|S t|t}|r0|jr0t|d }||jkr!|S |j| }|j||d d n{t|t	rAt|t
r@||| }njt|drft| d |j|||| jd}W d   n1 s`w   Y  nE|jdurz&|jdv sv|jd	kr|||}n|durt|D ]\}	}
||
||	< qW n ttfy } ztd
| d| |d}~ww |s|jrt|r|n|g}t|tsJ |D ]}||jvrtd
| d|d|j q|S )zChecks the value for a given action.

        Args:
            action: The action used for parsing.
            value: The value to parse.
            key: The configuration key.

        Raises:
            TypeError: If the value is not valid.
        Nr  r   r  _check_typer   )r   r   r(  >   Nrm   r   zParser key "z": z not among choices )r   ro   ry   r?   rj   r4   r   r  r   r   r   
check_typern   r   _check_type_r   rV   r   rr  r  r   r   rz   )r^   rW   rO  rM  r   r   is_subcommandleaf_keyrN  r   r   r   valsrV  rc   rc   rd   r     sL   









zArgumentParser._check_value_keyc                 C      | j S )a  Default config file locations.

        :getter: Returns the current default config file locations.
        :setter: Sets new default config file locations, e.g. ``['~/.config/myapp/*.yaml']``.

        Raises:
            ValueError: If an invalid value is given.
        )r  rb  rc   rc   rd   r        
z#ArgumentParser.default_config_filesc                    s   |d u rg  _ nt|trtdd |D rdd |D  _ ntdt j dkrKt dsId}t d	t}| |d
}|g j	  _	| _
d S d S t drb fdd j	D  _	t d d S d S )Nc                 s   s     | ]}t |ttjfV  qd S r   )ry   r   r   PathLiker  rc   rc   rd   r     s    
z6ArgumentParser.default_config_files.<locals>.<genexpr>c                 S   s   g | ]}t |qS rc   )r   fspath)r   drc   rc   rd   r|    r  z7ArgumentParser.default_config_files.<locals>.<listcomp>z=default_config_files expects None or List[str | os.PathLike].r   r  zdefault config file locationsr   )titlec                    s   g | ]	}| j kr|qS rc   )r  r  rb  rc   rd   r|    r}  )r  ry   rz   r  r   r   rn   r   rS   rT   r  delattr)r^   r   group_titler   r   rc   rb  rd   r      s&   


c                 C   r	  )a  Whether by default environment variables parsing is enabled.

        If the ``JSONARGPARSE_DEFAULT_ENV`` environment variable is set to true or
        false, that value will take precedence.

        :getter: Returns the current default environment variables parsing setting.
        :setter: Sets the default environment variables parsing setting.

        Raises:
            ValueError: If an invalid value is given.
        )r   rb  rc   rc   rd   r     s   zArgumentParser.default_envc                 C   sf   t dd }|dv r|dk| _nt|tr|| _ntd| jr/| jj	 D ]}| j|_
q(d S d S )NJSONARGPARSE_DEFAULT_ENVr0  >   r  r  r  zdefault_env expects a boolean.)r   getenvr  r   ry   r   r   r   r  valuesr   )r^   r   os_default_envrN  rc   rc   rd   r   %  s   

c                 C   r	  )zThe environment variables prefix property.

        :getter: Returns the current environment variables prefix.
        :setter: Sets the environment variables prefix.

        Raises:
            ValueError: If an invalid value is given.
        )_env_prefixrb  rc   rc   rd   r   2  r
  zArgumentParser.env_prefixc                 C   sh   |d u rddl m}m} |t|dd d}n|du r$tj| jd }nt|t	t
fs/td|| _d S )	Nr	   )deprecation_warning env_prefix_property_none_message   )
stacklevelFTr   z)env_prefix expects a string or a boolean.)_deprecatedr  r  rQ   r   r,  splitextr  ry   r   r   r   r  )r^   r   r  r  rc   rc   rd   r   >  s   
c                 C   r	  )a  Mode for parsing configuration files: ``yaml``, ``json``, ``jsonnet`` or ones added via
        :func:`.set_loader`.

        :getter: Returns the current parser mode.
        :setter: Sets the parser mode.

        Raises:
            ValueError: If an invalid value is given.
        )_parser_moderb  rc   rc   rd   r   N  s   zArgumentParser.parser_modec                 C   sf   t tddh}||vrtd| d|dkrtd || _| jr/| jj D ]}||_	q)d S d S )N	omegaconfr   z-The only accepted values for parser_mode are r   jsonnetzparser_mode=jsonnet)
r   r,   unionr   r9   r  r   r  r  r   )r^   r   acceptedrN  rc   rc   rd   r   [  s   c                 C   r	  )zHeader to include as comment when dumping a config object.

        :getter: Returns the current dump header.
        :setter: Sets the dump header.

        Raises:
            ValueError: If an invalid value is given.
        )_dump_headerrb  rc   rc   rd   r   g  r
  zArgumentParser.dump_headerc                 C   s6   |d u st |trtdd |D std|| _d S )Nc                 s   r   r   r   r  rc   rc   rd   r   v  r   z-ArgumentParser.dump_header.<locals>.<genexpr>z5Expected dump_header to be None or a list of strings.)ry   rz   r  r   r!  )r^   r   rc   rc   rd   r   s  s   $
)NN)FFT)TNN)NNNT)NNT)NT)r0  NNT)r0  NN)Tr   )r   TFFFT)r0  )r   TFFTN)Fr   r   )TFN)TF)T)Rr   r   r   r   rV   r   HelpFormatterr   r   r   r   r   rS   r   r?   r   r   r"   r;   r   r   loggingLoggerrz   r   r  r[   r   r   r   r-   r   _Environr   r   r
  r   r  r   r  r/  r+  r2  r   r5  r8  rA  rD  rF  rv  rJ   r  r  r   r  r  r   r   r   r   r   rI   r  r  r  r  r  r  r  r   r  r   Actionr   propertyr   setterr   r   r   r   r   rc   rc   ra   rd   rQ      sb  
 

	


4	
4


J
(.*
+
(
5
#


9	
o<


\
&
?
I
/" )parse_as_dict_patchSPHINX_BUILD)ur   r   r  r   r#  r   r  collections.abcr   
contextlibr   typingr   r   r   r   r   r  r
   r   r   r   r   r   r   _commonr   r   r   r   r   r   r   r   r   r   r   _completionsr   r   r   r  r  r   r    r!   _formattersr"   r#   _jsonnetr$   _jsonschemar%   _link_argumentsr&   r'   _loaders_dumpersr(   r)   r*   r+   r,   
_namespacer-   r.   r/   r0   r1   r2   r3   r4   r5   
_optionalsr6   r7   r8   r9   r:   r;   _parameter_resolversr<   _pathsr=   _signaturesr>   _subcommandsr?   r@   rA   rB   rC   rD   rE   rF   
_typehintsrG   rH   _utilrI   rJ   rK   rL   rM   rN   rO   __all__	signaturerQ   r   
parametersr   _ActionsContainerrP   _ArgumentGrouprS   r)  r   rc   rc   rc   rd   <module>   s`    $4	, (
$
v           
