python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
argparse.cpython-312.pyc

ˑedZdZgdZddlZddlZddlZddl	Z	ddl
m
ZmZdZ
dZdZd	Zd
ZdZdZGd
deZdZGddeZGddeZGddeZGddeZGddeZdZGddeZGddeZGdd eZ eZ!Gd!d"e Z"Gd#d$e Z#Gd%d&e Z$Gd'd(e$Z%Gd)d*e$Z&Gd+d,e Z'Gd-d.e Z(Gd/d0e Z)Gd1d2e Z*Gd3d4e Z+Gd5d6e Z,Gd7d8e'Z-Gd9d:eZ.Gd;d<eZ/Gd=d>eZ0Gd?d@e0Z1GdAdBe1Z2GdCdDee0Z3y)Ea
Command-line parsing library

This module is an optparse-inspired command-line parsing library that:

    - handles both optional and positional arguments
    - produces highly informative usage messages
    - supports parsers that dispatch to sub-parsers

The following is a simple usage example that sums integers from the
command-line and writes the result to a file::

    parser = argparse.ArgumentParser(
        description='sum the integers at the command line')
    parser.add_argument(
        'integers', metavar='int', nargs='+', type=int,
        help='an integer to be summed')
    parser.add_argument(
        '--log', default=sys.stdout, type=argparse.FileType('w'),
        help='the file where the sum should be written')
    args = parser.parse_args()
    args.log.write('%s' % sum(args.integers))
    args.log.close()

The module contains the following public classes:

    - ArgumentParser -- The main entry point for command-line parsing. As the
        example above shows, the add_argument() method is used to populate
        the parser with actions for optional and positional arguments. Then
        the parse_args() method is invoked to convert the args at the
        command-line into an object with attributes.

    - ArgumentError -- The exception raised by ArgumentParser objects when
        there are errors with the parser's actions. Errors raised while
        parsing the command-line are caught by ArgumentParser and emitted
        as command-line messages.

    - FileType -- A factory for defining types of files to be created. As the
        example above shows, instances of FileType are typically passed as
        the type= argument of add_argument() calls.

    - Action -- The base class for parser actions. Typically actions are
        selected by passing strings like 'store_true' or 'append_const' to
        the action= argument of add_argument(). However, for greater
        customization of ArgumentParser actions, subclasses of Action may
        be defined and passed as the action= argument.

    - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter,
        ArgumentDefaultsHelpFormatter -- Formatter classes which
        may be passed as the formatter_class= argument to the
        ArgumentParser constructor. HelpFormatter is the default,
        RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser
        not to change the formatting for help text, and
        ArgumentDefaultsHelpFormatter adds information about argument defaults
        to the help.

All other classes in this module are considered implementation details.
(Also note that HelpFormatter and RawDescriptionHelpFormatter are only
considered public as object names -- the API of the formatter objects is
still considered an implementation detail.)
z1.1)ArgumentParser
ArgumentErrorArgumentTypeErrorBooleanOptionalActionFileType
HelpFormatterArgumentDefaultsHelpFormatterRawDescriptionHelpFormatterRawTextHelpFormatterMetavarTypeHelpFormatter	NamespaceActionONE_OR_MOREOPTIONALPARSER	REMAINDERSUPPRESSZERO_OR_MOREN)gettextngettextz==SUPPRESS==?*+zA......_unrecognized_argsc"eZdZdZdZdZdZy)_AttributeHolderaAbstract base class that provides __repr__.

    The __repr__ method returns a string in the format::
        ClassName(attr=name, attr=name, ...)
    The attributes are determined either by a class-level attribute,
    '_kwarg_names', or by inspecting the instance __dict__.
    ct|j}g}i}|jD]}|jt	||jD]1\}}|j
r|j|d|-|||<3|r|jdt	|z|ddj|dS)N=z**%s(, ))type__name__	_get_argsappendrepr_get_kwargsisidentifierjoin)self	type_namearg_strings	star_argsargnamevalues       </BuggyBox/python/3.12.0/bootstrap/lib/python3.12/argparse.py__repr__z_AttributeHolder.__repr__vsJ''		>>#	*CtCy)	*++-	(KD%  """dE#:;"'	$		(
vY78$dii&<==cHt|jjSN)list__dict__itemsr+s r2r(z_AttributeHolder._get_kwargssDMM'')**r4cgSr6r:s r2r%z_AttributeHolder._get_argss	r4N)r$
__module____qualname____doc__r3r(r%r<r4r2rrms
>+r4rc`|gSt|tur|ddSddl}|j|SNr)r#r7copy)r9rBs  r2_copy_itemsrCs5}	E{dQx99Ur4ceZdZdZ			ddZdZdZGddeZdZ	d	Z
d
ZdZd dZ
d
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy)!rzFormatter for generating usage messages and argument help strings.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    Nc|#ddl}|jj}|dz}||_||_t|t
|dz
|dz|_||_d|_	d|_
d|_|j|d|_
|j|_tj dtj"|_tj d|_y)Nrz\s+z\n\n\n+)shutilget_terminal_sizecolumns_prog_indent_incrementminmax_max_help_position_width_current_indent_level_action_max_length_Section
_root_section_current_section_recompileASCII_whitespace_matcher_long_break_matcher)r+progindent_incrementmax_help_positionwidthrHs      r2__init__zHelpFormatter.__init__s=,,.66EQJE
!1"%&7&)%"*6F6J&K#M "#!]]46 $ 2 2#&;;vsyy#A #&;;z#: r4cl|xj|jz
c_|xjdz
c_yNrQrLrRr:s r2_indentzHelpFormatter._indents' 6 66qr4c|xj|jzc_|jdk\sJd|xjdzc_y)NrzIndent decreased below 0.rcrdr:s r2_dedentzHelpFormatter._dedents> 6 66##q(E*EEqr4ceZdZddZdZy)HelpFormatter._SectionNc<||_||_||_g|_yr6)	formatterparentheadingr9)r+rkrlrms    r2r`zHelpFormatter._Section.__init__s&DN DK"DLDJr4c	|j|jj|jj}||jDcgc]
\}}||c}}}|j|jj|sy|jtur5|j)|jj}d|d|jfz}nd}|d||dgScc}}w)Nz%*s%s:

)	rlrkre_join_partsr9rgrmrrQ)r+r*funcargs	item_helpcurrent_indentrms       r2format_helpz"HelpFormatter._Section.format_helps{{&&&(>>--DDJJGjdDdDkGHI{{&&&(||8+0H!%!?!?$DLL'IIw	4899!HsC#
r6)r$r=r>r`rvr<r4r2rTris		:r4rTcR|jjj||fyr6)rVr9r&)r+rrrss   r2	_add_itemzHelpFormatter._add_items ##**D$<8r4c|j|j||j|}|j|jg||_yr6)rerTrVrxrv)r+rmsections   r2
start_sectionzHelpFormatter.start_sections?--d&;&;WEw**B/ 'r4cZ|jj|_|jyr6)rVrlrgr:s r2end_sectionzHelpFormatter.end_sections $ 5 5 < <r4cV|tur!||j|j|gyyyr6)rrx_format_text)r+texts  r2add_textzHelpFormatter.add_texts-xD$4NN4,,tf5%5r4cZ|tur#||||f}|j|j|yyr6)rrx
_format_usage)r+usageactionsgroupsprefixrss      r2	add_usagezHelpFormatter.add_usages1 '661DNN4--t4!r4cn|jtur|j}||g}|j|D]}|j	||tt
t|}||jz}t|j||_	|j|j|gyyr6)helpr_format_action_invocation_iter_indented_subactionsr&rNmaplenrQrSrx_format_action)r+actionget_invocationinvocations	subactioninvocation_length
action_lengths       r2add_argumentzHelpFormatter.add_arguments;;h&";;N)&12K!;;FC
>	"">)#<=
>!$C[$9 :-0D0DDM&)$*A*A*7'9D#
NN4..9'r4c4|D]}|j|yr6)r)r+rrs   r2
add_argumentszHelpFormatter.add_argumentss	&Ff%	&r4c|jj}|r0|jjd|}|j	ddz}|S)N

rp)rUrvr[substrip)r+rs  r2rvzHelpFormatter.format_helpsI!!--/++//=D::d#d*Dr4c^dj|Dcgc]}|r
|tur|c}Scc}w)Nro)r*r)r+part_stringsparts   r2rqzHelpFormatter._join_parts$s8ww$0: D$8:;	;:s*c|td}||t|jz}nB||sdt|jz}n#| dt|jz}g}g}|D]1}|jr|j	|!|j	|3|j
}	|	||z|}
dj
||
fDcgc]}|s|	c}}|j|jz
t|t|zkDr]d}|	||}
|	||}tj||
}tj||}dj
||
k(sJdj
||k(sJdfd	}t|t|zdzkr[dt|t|zdzz}|r'||g|z||}|j|||nw|r||g|z||}nf|g}nbdt|z}||z}|||}t|dkDr2g}|j||||j||||g|z}d	j
|}||d
Scc}w)Nzusage: r\z%(prog)s z%\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+cg}g}t|}|t|dz
}n|dz
}|D]d}|dzt|zkDr,|r*|j|dj|zg}|dz
}|j||t|dzz
}f|r#|j|dj|z||d|d|d<|S)Nrcrr)rr&r*)	partsindentrlinesline
indent_lengthline_lenr
text_widths	        r2	get_linesz.HelpFormatter._format_usage.<locals>.get_linesYsED$'KM)#&v;?#01#4 %2#a<#d)3j@T!LL#((4.)@A#%D'4q'8HD) CIM1
2Vchhtn%<=)#(8MN#;a Lr4g?rcrprr6)
_dictrKoption_stringsr&_format_actions_usager*rPrQrrWfindallextend)r+rrrrr\	optionalspositionalsrformataction_usagespart_regexp	opt_usage	pos_usage	opt_parts	pos_partsrrrrrs                     @r2rzHelpFormatter._format_usage)s>y\FDdjj11E]74::!66E]$** 55DIK!
/(($$V,&&v.	
///F!)k"96BLHH$)=CAaCDEt';';;J6{SZ'*4
#9f5	";7	KKY?	KKY?	xx	*i77xx	*i77!,v;T*dZ.?? CK#d)$;a$?@F  )4&9*<ff MYy&%AB" )4&9*<ff M!%!3v;.F%	1E%eV4E5zA~ "Yy&%ABYy&%AB!FUNE		%($U++GDs
I5I5ct}i}|D]1}|jstd|	|j|jd}t	|j}||z}||||jk(sjd}	|jD]+}
|j|
|
jtus'|	dz
}	-||	z
}|js/||vr||xxdz
cc<nd||<||vr||xxdz
cc<n9d||<n3|dkDr.||vr||xxdz
cc<nd||<||vr||xxd	z
cc<nd	||<t|dz|D]}d
||<	4g}
t|D]U\}}
|
jturd|
jd|j|d
k(r|j|P|j|dzd
k(sh|j|dz}|
jsN|j|
}|j!|
|}|
|vr|ddk(r
|ddk(r|dd}|
j||
jd}|
j"dk(r|
j%}n*|j'|
}|j!|
|}|d|}|
js	|
|vrd
|z}|
j|Xt)|dD]}||g|
||
dj+|
Dcgc]}||	c}}d}d}t-j.d|zd|}t-j.d|zd|}t-j.|d|d|}|j1}|S#t$rYJwxYwcc}w)Nzempty group rrcz [[]z (r r"|r[%s]T)reversez[\[(]z[\])]z(%s) z\1 (%s)z *ro)set_group_actions
ValueErrorindexraddrrrequiredrange	enumerater&getpopr#_get_default_metavar_for_positional_format_argsnargsformat_usage!_get_default_metavar_for_optionalsortedr*rWrr)r+rr
group_actionsinsertsgroupstartgroup_action_countendsuppressed_actions_countrexposed_actions_countirdefaultr
option_stringargs_stringitemropencloses                      r2rz#HelpFormatter._format_actions_usages
(	)E'' <w!788$
)

e&:&:1&=>&))=)=%>"005%)=)==/0,"'"6"6:%))&1!;;(2494:
-?AY,Y) >> G+#ENd2N-0GEN'>#CLC/L+.GCL.2 G+#ENd2N-0GEN'>#CLC/L+.GCL"519c2)%(
)O(	)V"7+-	#IAv{{h&T";;q>S(KKN[[Q'3.KKA&**BB6J((9]*Aw#~$r(c/#AbzT"!' 5 5a 8
<<1$!..0D
#DDVLG"&"3"3FG"DK&3[AD6+F!D=DT"[-	#`.	&A!!*E!AJ	&xx%D$43CDEwwx$t4wwx%'5wwD%0#t<zz|K

tEsM
MM
	MMcd|vr|t|jz}t|j|jz
d}d|jz}|j|||dzS)Nz%(prog)rrr)rrKrNrPrQ
_fill_text)r+rrrs    r2rzHelpFormatter._format_texts`$DJJ//Dt';';;R@
t+++tZ86AAr4c`t|jdz|j}t|j|z
d}||j
z
dz
}|j
|}|js|j
d|f}d|z}n<t||kr|j
d||f}d|z}d}n|j
d|f}d|z}|}|g}|jr{|jjra|j|}	|	rp|j|	|}
|jdd|
dfz|
ddD]}|jd|d|fzn"|jds|jd|j|D]"}|j|j|$|j!|S)	NrFrroz%*s%s
z	%*s%-*s  rrcrp)rMrSrOrNrPrQrrrr_expand_help_split_linesr&endswithrrrq)
r+r
help_position
help_widthaction_width
action_headertupindent_firstr	help_text
help_linesrrs
             r2rzHelpFormatter._format_actionsD33a7 335
}4b9
$t';';;a?66v>
{{&&M9C%OM
<
/&&L-GC'#-ML&&M9C%OM(L;;6;;,,.))&1I!..y*E
Y,JqM)JJK&qrNHDLLmR-F!FGH''-LL77?	9ILL,,Y78	9&&r4c|js-|j|}|j||d\}|Sg}|jdk(r|j	|jnJ|j|}|j
||}|jD]}|j|d|dj|S)Nrcrrr!)	rr_metavar_formatterrrrrr&r*)r+rrmetavarrrrs       r2rz'HelpFormatter._format_action_invocation2s$$>>vFG?t..vw?BHGNE||q V223
@@H"//@%+%:%:IMLLM;!GHI99U##r4c|j
|jnE|j7|jDcgc]
}t|}}ddj|zn|fd}|Scc}w)Nz{%s},c4ttrSf|zSr6)
isinstancetuple)
tuple_sizeresults r2rz0HelpFormatter._metavar_formatter.<locals>.formatSs&%(
zJ..r4)rchoicesstrr*)r+rdefault_metavarchoicechoice_strsrrs      @r2rz HelpFormatter._metavar_formatterJse>>%^^F
^^
'5;^^D63v;DKDchh{33F$F	/

EsA'c|j||}|j
d|dz}|S|jtk(r
d|dz}|S|jtk(r$|d}t	|dk(rd|z}|Sd|z}|S|jt
k(r
d|dz}|S|jtk(rd}|S|jtk(r
d	|dz}|S|jtk(rd
}|S	t|jDcgc]}d}}dj|||jz}|Scc}w#t$r
tddwxYw)
Nz%srcrrFz
[%s [%s ...]]z[%s ...]z%s [%s ...]rz%s ...rozinvalid nargs valuer)
rrrrrrrrrr	TypeErrorrr*)r+rrget_metavarrrrformatss        r2rzHelpFormatter._format_argsZs--foF<<KN*F.
-\\X
%k!n,F*
)\\\
)!!nG7|q (72"
$g-
\\[
("[^3F
\\Y
&F
\\V
#A.F
\\X
%F

B).v||)<=A4==XXg&V\\)BBF
	>
B !67TA
Bs2D?		D:D?:D??Ectt||j}t|D]}||tus||=t|D]$}t||ds||j||<&|jd0dj|dDcgc]
}t|c}}||d<|j||zScc}w)Nrr$rr!)rvarsrKr7rhasattrr$rr*r_get_help_string)r+rparamsr0cchoices_strs      r2rzHelpFormatter._expand_helpvsd6l4L	!Dd|x'4L	!L	5Dvd|Z0%d|44t	5::i ,))VI5F$GSV$GHK +F9$$V,v55%HsCc#K	|j}|j|Ed{|jy7#t$rYywxYwwr6)_get_subactionsrergAttributeError)r+rget_subactionss   r2rz'HelpFormatter._iter_indented_subactionssN	#33N
LLN%'''LLN
(			s1AAAAA	AA
AAc|jjd|j}ddl}|j	||S)Nrr)rZrrtextwrapwrap)r+rr_rs    r2rzHelpFormatter._split_liness9''++C6<<>	}}T5))r4c|jjd|j}ddl}|j	||||S)Nrr)initial_indentsubsequent_indent)rZrrrfill)r+rr_rrs     r2rzHelpFormatter._fill_textsF''++C6<<>}}T5,2/57	7r4c|jSr6)rr+rs  r2rzHelpFormatter._get_help_string{{r4c6|jjSr6)destupperrs  r2rz/HelpFormatter._get_default_metavar_for_optionals{{  ""r4c|jSr6)rrs  r2rz1HelpFormatter._get_default_metavar_for_positionalrr4)rFNr6) r$r=r>r?r`rergobjectrTrxr{r}rrrrrvrqrrrrrrrrrrrrrrr<r4r2rrs#$#%	;>
:6:>9(65
:$&;
_,BobB.'`$0 86*7#r4rceZdZdZdZy)r	zHelp message formatter which retains any formatting in descriptions.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    cXdjfd|jdDS)Nroc3(K|]	}|zywr6r<).0rrs  r2	<genexpr>z9RawDescriptionHelpFormatter._fill_text.<locals>.<genexpr>sPv}PsT)keepends)r*
splitlines)r+rr_rs   `r2rz&RawDescriptionHelpFormatter._fill_texts#wwP$1OPPPr4N)r$r=r>r?rr<r4r2r	r	s
Qr4r	ceZdZdZdZy)r
zHelp message formatter which retains formatting of all help text.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c"|jSr6)r&)r+rr_s   r2rz!RawTextHelpFormatter._split_liness  r4N)r$r=r>r?rr<r4r2r
r
s!r4r
ceZdZdZdZy)rzHelp message formatter which adds default values to argument help.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c|j}|d}d|vr=|jtur+ttg}|j
s|j|vr|dz
}|S)a6
        Add the default value to the option help message.

        ArgumentDefaultsHelpFormatter and BooleanOptionalAction when it isn't
        already present. This code will do that, detecting cornercases to
        prevent duplicates or cases where it wouldn't make sense to the end
        user.
        roz
%(default)z (default: %(default)s))rrrrrrr)r+rrdefaulting_nargss    r2rz.ArgumentDefaultsHelpFormatter._get_help_strings[{{<Dt#~~X-$,l#; ((FLL<L,L55Dr4N)r$r=r>r?rr<r4r2rrsr4rceZdZdZdZdZy)raHelp message formatter which uses the argument 'type' as the default
    metavar value (instead of the argument 'dest')

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c.|jjSr6r#r$rs  r2rz:MetavarTypeHelpFormatter._get_default_metavar_for_optional{{###r4c.|jjSr6r.rs  r2rz<MetavarTypeHelpFormatter._get_default_metavar_for_positionalr/r4N)r$r=r>r?rrr<r4r2rrs$$r4rc2|y|jrdj|jS|jdtfvr|jS|jdtfvr|jS|j
r!ddj|j
zdzSy)N/{r})rr*rrrr)arguments r2_get_action_namer6s		 	 xx//00			$!1	1	tX.	.}}			SXXh..//#55r4ceZdZdZdZdZy)rzAn error from creating or using an argument (optional or positional).

    The string value of this exception is the message, augmented with
    information about the argument that caused it.
    c2t||_||_yr6)r6
argument_namemessage)r+r5r:s   r2r`zArgumentError.__init__s-h7r4c~|jd}ntd}|t|j|jzS)Nz%(message)sz'argument %(argument_name)s: %(message)s)r:r9)r9rrr:)r+rs  r2__str__zArgumentError.__str__sA%"F@AFT\\+/+=+=??	?r4N)r$r=r>r?r`r<r<r4r2rrs?r4rceZdZdZy)rz@An error from trying to convert a command line string to a type.N)r$r=r>r?r<r4r2rrsJr4rc<eZdZdZ								ddZdZdZddZy)	r
a\	Information about how to convert command line strings to Python objects.

    Action objects are used by an ArgumentParser to represent the information
    needed to parse a single argument from one or more strings from the
    command line. The keyword arguments to the Action constructor are also
    all attributes of Action instances.

    Keyword Arguments:

        - option_strings -- A list of command-line option strings which
            should be associated with this action.

        - dest -- The name of the attribute to hold the created object(s)

        - nargs -- The number of command-line arguments that should be
            consumed. By default, one argument will be consumed and a single
            value will be produced.  Other values include:
                - N (an integer) consumes N arguments (and produces a list)
                - '?' consumes zero or one arguments
                - '*' consumes zero or more arguments (and produces a list)
                - '+' consumes one or more arguments (and produces a list)
            Note that the difference between the default and nargs=1 is that
            with the default, a single value will be produced, while with
            nargs=1, a list containing a single value will be produced.

        - const -- The value to be produced if the option is specified and the
            option uses an action that takes no values.

        - default -- The value to be produced if the option is not specified.

        - type -- A callable that accepts a single string argument, and
            returns the converted value.  The standard Python types str, int,
            float, and complex are useful examples of such callables.  If None,
            str is used.

        - choices -- A container of values that should be allowed. If not None,
            after a command-line argument has been converted to the appropriate
            type, an exception will be raised if it is not a member of this
            collection.

        - required -- True if the action must always be specified at the
            command line. This is only meaningful for optional command-line
            arguments.

        - help -- The help string describing the argument.

        - metavar -- The name to be used for the option's argument with the
            help string. If None, the 'dest' value will be used as the name.
    Nc||_||_||_||_||_||_||_||_|	|_|
|_	yr6
rrrconstrr#rrrr)r+rrrrArr#rrrrs           r2r`zAction.__init__JsK-	

	 
	r4cLgd}|Dcgc]}|t||fc}Scc}w)Nr@getattrr+namesr0s   r2r(zAction._get_kwargs`s+
9>>wtT*+>>>!c |jdSrA)rr:s r2rzAction.format_usageos""1%%r4c*ttd)Nz.__call__() not defined)NotImplementedErrorrr+parser	namespacevaluesrs     r2__call__zAction.__call__rs!!$=">??r4NNNNNFNNr6)r$r=r>r?r`r(rrOr<r4r2r
r
s70j,
?&@r4r
c:eZdZdeeddeffd	ZddZdZxZS)rNFc	bg}	|D]>}
|	j|
|
jds&d|
ddz}
|	j|
@dD].}t|tust	j
|dd0|turd}|turd}|turd}t||	|d||||||		y)
N----no-rF)r#rrzP{name!r} is deprecated as of Python 3.12 and will be removed in Python {remove}.))remover)	rrrrr#rrrr)r&
startswithlocals_deprecated_defaultwarnings_deprecatedsuperr`)
r+rrrr#rrrr_option_stringsr
field_name	__class__s
            r2r`zBooleanOptionalAction.__init__zs+	6M""=1''- '-*; ;
&&}5	69	$Jx
#+>>$$2"	$	$&&D))G))G
*			r4cp||jvr(t||j|jdyy)NrT)rsetattrrrXrKs     r2rOzBooleanOptionalAction.__call__s3D///Ityym.F.Fw.O*OP0r4c8dj|jS)Nz | )r*rr:s r2rz"BooleanOptionalAction.format_usageszz$--..r4r6)r$r=r>rZr`rOr
__classcell__r`s@r2rrys(),,-`Q/r4rc8eZdZ								dfd	ZddZxZS)_StoreActionc|dk(rtd||tk7rtdtztt||||||||||	|

y)Nrznargs for store actions must be != 0; if you have nothing to store, actions such as store true or store const may be more appropriate nargs must be %r to supply constr@)rrr]rgr`r+rrrrArr#rrrrr`s           r2r`z_StoreAction.__init__ssA:KL
L(!2?(JKK
lD*)	+
	r4c2t||j|yr6)rbrrKs     r2rOz_StoreAction.__call__s	499f-r4rPr6r$r=r>r`rOrdres@r2rgrgs'
:.r4rgc2eZdZ					dfd	ZddZxZS)_StoreConstActionc	:tt|||d||||y)Nr)rrrrArrr)r]rnr`	r+rrrArrrrr`s	        r2r`z_StoreConstAction.__init__s/	/)	0	r4cFt||j|jyr6)rbrrArKs     r2rOz_StoreConstAction.__call__s	499djj1r4NNFNNr6rlres@r2rnrns
"2r4rnc&eZdZ			dfd	ZxZS)_StoreTrueActionc8tt|||d|||y)NTrrrArrr)r]rtr`r+rrrrrr`s      r2r`z_StoreTrueAction.__init__s,	.)
	/	r4)FFNr$r=r>r`rdres@r2rtrts
r4rtc&eZdZ			dfd	ZxZS)_StoreFalseActionc8tt|||d|||y)NFrv)r]rzr`rws      r2r`z_StoreFalseAction.__init__s,	/)
	0	r4)TFNrxres@r2rzrzs
r4rzc8eZdZ								dfd	ZddZxZS)
_AppendActionc|dk(rtd||tk7rtdtztt||||||||||	|

y)Nrznargs for append actions must be != 0; if arg strings are not supplying the value to append, the append const action may be more appropriaterir@)rrr]r}r`rjs           r2r`z_AppendAction.__init__ssA:OP
P(!2?(JKK
mT+)	,
	r4ct||jd}t|}|j|t	||j|yr6)rDrrCr&rbr+rLrMrNrr9s      r2rOz_AppendAction.__call__-:	499d3E"
V	499e,r4rPr6rlres@r2r}r}s'
:-r4r}c2eZdZ					dfd	ZddZxZS)_AppendConstActionc
<tt|||d|||||y)Nr)rrrrArrrr)r]rr`rps	        r2r`z_AppendConstAction.__init__6s2	 $0)	1	r4ct||jd}t|}|j|jt||j|yr6)rDrrCr&rArbrs      r2rOz_AppendConstAction.__call__Hs>	499d3E"
TZZ 	499e,r4rrr6rlres@r2rr4s
$-r4rc.eZdZ			dfd	ZddZxZS)_CountActionc8tt|||d|||y)Nr)rrrrrr)r]rr`rws      r2r`z_CountAction.__init__Qs+	lD*)
	+	r4cnt||jd}|d}t||j|dzy)Nrrc)rDrrb)r+rLrMrNrcounts      r2rOz_CountAction.__call___s2	499d3=E	499eai0r4)NFNr6rlres@r2rrOs
1r4rc.eZdZeedffd	ZddZxZS)_HelpActionNc6tt||||d|yNr)rrrrr)r]rr`)r+rrrrr`s     r2r`z_HelpAction.__init__hs(
	k4))	*	r4cD|j|jyr6)
print_helpexitrKs     r2rOz_HelpAction.__call__ts
r4r6r$r=r>rr`rOrdres@r2rrfs!	
r4rc0eZdZdeedffd	ZddZxZS)_VersionActionNz&show program's version number and exitcDtt||||d|||_yr)r]rr`version)r+rrrrrr`s      r2r`z_VersionAction.__init__{s1	nd,)	-	r4c|j}||j}|j}|j||j|j	t
j|jyr6)r_get_formatterr_print_messagerv_sysstdoutr)r+rLrMrNrrrks       r2rOz_VersionAction.__call__s[,,?nnG))+	7#i335t{{C
r4r6rres@r2rrys!>r4rcReZdZGddeZedddffd	ZdZdZd	dZ	xZ
S)
_SubParsersActionceZdZfdZxZS)&_SubParsersAction._ChoicesPseudoActionc|x}}|r|ddj|zz
}ttj|}|j	g|||y)Nrr!)rrrr)r*r]r_ChoicesPseudoActionr`)r+r0aliasesrrrsupr`s       r2r`z/_SubParsersAction._ChoicesPseudoAction.__init__sU!!Gd7TYYw%777)>>ECLLD!(

*r4rxres@r2rrs
	*	*r4rFNc	||_||_i|_g|_tt
|||t|j|||y)N)rrrrrrr)_prog_prefix
_parser_class_name_parser_map_choices_actionsr]rr`r)	r+rr\parser_classrrrrr`s	        r2r`z_SubParsersAction.__init__sU!) " "
/)))	0	r4c|jd|jd||d<|jdd}||jvrt	|td|z|D](}||jvst	|td|zd|vr?|jd}|j
|||}|jj||jdi|}||j|<|D]}||j|<|S)Nr\rrr<zconflicting subparser: %szconflicting subparser alias: %sr)
rrrrrrrrr&r)r+r0kwargsraliasr
choice_actionrLs        r2
add_parserz_SubParsersAction.add_parsers(::f%(,(9(94@F6N**Y+4(((a(C&Dt&KLL	HE---#!=>FHH	HV::f%D 55dGTJM!!((7$##-f-&,d#	2E+1D!!%(	2
r4c|jSr6)rr:s r2r
z!_SubParsersAction._get_subactionss$$$r4c|d}|dd}|jturt||j|	|j|}|j|d\}	}t|	jD]\}
}t||
||r?t|jtgt|tj|yy#t$r9|dj|jd}t
d|z}t||wxYw)Nrrcr!)parser_namerz5unknown parser %(parser_name)r (choices: %(choices)s))rrrbrKeyErrorr*rrparse_known_argsrr9
setdefault_UNRECOGNIZED_ARGS_ATTRrDr)r+rLrMrNrrr-rsmsgsubnamespacekeyr1s            r2rOz_SubParsersAction.__call__sQiQRj99H$Ityy+6	+**;7F%+$;$;K$N!k|,224	+JCIsE*	+O&&'>CI67>>{K#	+#.#yy)>)>?ADKLtSCc**		+sC		ADr6)r$r=r>r
rrr`rr
rOrdres@r2rrs2*v*.<%Lr4rceZdZddZy)
_ExtendActionNct||jd}t|}|j|t	||j|yr6)rDrrCrrbrs      r2rOz_ExtendAction.__call__rr4r6)r$r=r>rOr<r4r2rrs-r4rc$eZdZdZddZdZdZy)raFactory for creating file object types

    Instances of FileType are typically passed as type= arguments to the
    ArgumentParser add_argument() method.

    Keyword Arguments:
        - mode -- A string indicating how the file is to be opened. Accepts the
            same values as the builtin open() function.
        - bufsize -- The file's desired buffer size. Accepts the same values as
            the builtin open() function.
        - encoding -- The file's encoding. Accepts the same values as the
            builtin open() function.
        - errors -- A string indicating how encoding and decoding errors are to
            be handled. Accepts the same value as the builtin open() function.
    Nc<||_||_||_||_yr6)_mode_bufsize	_encoding_errors)r+modebufsizeencodingerrorss     r2r`zFileType.__init__s

!r4cF|dk(rdjvr8djvrtjjStjSt	fddDr8djvrtj
jStj
St
djz}t|	t|jjjjS#t$r#}||d}t
d}t||zd}~wwxYw)	N-rbc3:K|]}|jvywr6)r)r#r
r+s  r2r$z$FileType.__call__.<locals>.<genexpr>s4Q$**_4swaxzargument "-" with mode %r)filenameerrorz$can't open '%(filename)s': %(error)s)rrstdinbufferanyrrrrrrrOSErrorr)r+stringrersr:s`     r2rOzFileType.__call__sS=djj ,/4::,=tzz((M4::M4e44-0DJJ->t{{))ODKKO34tzzA o%	4

DMM4>>&
&	4 &3D>?G#GdN33	4s=6C44	D =DD c
L|j|jf}d|jfd|jfg}dj	|Dcgc]}|dk7s	t|c}|Dcgc]\}}||d|c}}z}t
|jd|dScc}wcc}}w)Nrrr!rrr r")rrrrr*r'r#r$)r+rsrr/kwargs_strs      r2r3zFileType.__repr__-szz4==(t~~.4<<0HI994EC3"9d3iEAG2gb#!$*,S1223 :..99F2s
B
B#B )rrNN)r$r=r>r?r`rOr3r<r4r2rrs 4(:r4rc"eZdZdZdZdZdZy)rzSimple object for storing attributes.

    Implements equality by attribute names and values, and provides a simple
    string representation.
    c2|D]}t||||yr6)rb)r+rr0s   r2r`zNamespace.__init__@s!	.DD$t-	.r4c\t|tstSt|t|k(Sr6)rrNotImplementedr)r+others  r2__eq__zNamespace.__eq__Ds%%+!!DzT%[((r4c||jvSr6)r8)r+rs  r2__contains__zNamespace.__contains__Isdmm##r4N)r$r=r>r?r`rrr<r4r2rr9s.)
$r4rceZdZfdZdZddZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZddZdZdZdZdZxZS)_ActionsContainerc@tt|||_||_||_||_i|_|jddt|jddt|jddt|jddt|jddt|jddt|jddt|jddt|jdd	t |jdd
t"|jddt$|jddt&|j)g|_i|_g|_g|_i|_t5j6d
|_g|_y)Nrstorestore_const
store_truestore_falser&append_constrrrparsersrz^-\d+$|^-\d*\.\d+$)r]rr`descriptionargument_defaultprefix_charsconflict_handler_registriesregisterrgrnrtrzr}rrrrrr_get_handler_actions_option_string_actions_action_groups_mutually_exclusive_groups	_defaultsrWrX_negative_number_matcher_has_negative_number_optionals)r+rrrrr`s     r2r`z_ActionsContainer.__init__Os\
	/1& 0( 0	


hl3

h6

h
/@A

h.>?

h
/@A

h-8

h0BC

h6

h4

h	>:

h	+<=

h-8	

&(#!*,'),4I(J%/1+r4cF|jj|i}|||<yr6)rr)r+
registry_namer1rregistrys     r2rz_ActionsContainer.registers###..}bA r4c@|j|j||Sr6)rr)r+rr1rs    r2
_registry_getz_ActionsContainer._registry_gets 
.225'BBr4c|jj||jD]%}|j|vs||j|_'yr6)rupdaterrr)r+rrs   r2set_defaultsz_ActionsContainer.set_defaultssEf%mm	5F{{f$!'!4	5r4c|jD],}|j|k(s|j |jcS|jj	|dSr6)rrrrr)r+rrs   r2get_defaultz_ActionsContainer.get_defaultsMmm	&F{{d"v~~'A~~%	&~~!!$--r4c|j}|rt|dk(r.|dd|vr$|rd|vrtd|j|i|}n|j|i|}d|vrA|d}||j
vr|j
||d<n|j|j|d<|j|}t|std|d|di|}|jd	|j|j}t|st|d
|turt|dt|dr!	|jj|d|j!|S#t$rtd
wxYw)z
        add_argument(dest, ..., name=value, ...)
        add_argument(option_string, option_string, ..., name=value, ...)
        rcrrz+dest supplied twice for positional argumentrNzunknown action ""r#z is not callablez: is a FileType class object, instance of it must be passedrz,length of metavar tuple does not match nargsr<)rrr_get_positional_kwargs_get_optional_kwargsrr_pop_action_classcallablerr#rrrrr_add_action)r+rsrcharsraction_classr	type_funcs        r2rz_ActionsContainer.add_arguments!!s4yA~$q'!*E*A&( !NOO0T00$A&AF/T..??FF"&>Dt~~%$(NN4$8y!&&2$($9$9y!--f5%lDEE''&&vv{{FKKH		"Y@AA 2;>?
?4)*
Q##%2264@''
Q !OPP
Qs8 E))E>cZt|g|i|}|jj||Sr6)_ArgumentGrouprr&)r+rsrrs    r2add_argument_groupz$_ActionsContainer.add_argument_groups/t5d5f5""5)r4cTt|fi|}|jj||Sr6)_MutuallyExclusiveGrouprr&)r+rrs   r2add_mutually_exclusive_groupz._ActionsContainer.add_mutually_exclusive_groups*'77''..u5r4cV|j||jj|||_|jD]}||j
|<|jD]F}|jj|s|jr,|jjdH|S)NT)	_check_conflictrr&	containerrrrmatchr)r+rrs   r2rz_ActionsContainer._add_actionsV$	


V$$22	@M9?D''
6	@$22	EM,,22=A::77>>tD	E
r4c:|jj|yr6)rrWrs  r2_remove_actionz _ActionsContainer._remove_actions

V$r4ci}|jD]B}|j|vr#td}t||jz|||j<Di}|jD]r}|j|vr?|j	|j|j
|j||j<|jD]}||j||<t|jD]4}|j|j}|jD]}|||<	6|jD]#}|j||j|%y)Nz.cannot merge actions - two groups are named %r)titlerr)r)rrrrrrrrrrrrrr)r+rtitle_group_maprr	group_maprmutex_groups        r2_add_container_actionsz(_ActionsContainer._add_container_actionssi((	1E{{o-HI !455+0OEKK(		1	--	AE{{/1/3/F/F++ % 1 1%*%;%;0G0=, ..
A$3EKK$@	&!
A	A"99	0E;;<)K ..
0$/	&!
0	0 ((	<FMM&$'33F;	<r4cd|vrtd}t||jdttfvrd|d<|jdtk(r	d|vrd|d<t||gS)Nrz1'required' is an invalid argument for positionalsrTrrr)rrrrrr)r+rrrs    r2rz(_ActionsContainer._get_positional_kwargsstGHCC. ::gx&>>!%F:::g,.9F3J!%F:Fb99r4cg}g}|D]~}|d|jvr(||jd}td}t||z|j|t	|dkDs\|d|jvsn|j||jdd}|U|r|d}n|d}|j
|j}|std}t|z|jdd}t|||	S)
Nr)optionrzNinvalid option string %(option)r: must start with a character %(prefix_chars)rrcrz%dest= is required for options like %rrrr)	rrrr&rrlstripreplacer)	r+rsrrlong_option_stringsrrrdest_option_strings	         r2rz&_ActionsContainer._get_optional_kwargs.s$ !	:M #t'8'88"/(,(9(9;GH t,,
!!-0=!A%-*:d>O>O*O#**=9	:zz&$'<"%8%;"%3A%6"%,,T->->?D?@ }!455<<S)DFnEEr4cL|jd|}|jd||S)Nr)rr)r+rrrs    r2rz#_ActionsContainer._pop_action_classPs'Hg.!!(FF;;r4cd|jz}	t||S#t$r$td}t	||jzwxYw)Nz_handle_conflict_%sz%invalid conflict_resolution value: %r)rrDrrr)r+handler_func_namers   r2rz_ActionsContainer._get_handlerTsV1D4I4II	:4!233	:;<CS4#8#8899	:s	-A
cg}|jD]3}||jvs|j|}|j||f5|r|j}|||yyr6)rrr&r)r+rconfl_optionalsrconfl_optionalrs      r2rz!_ActionsContainer._check_conflict]st#22	HM ; ;;!%!<!<]!K&&
~'FG	H#002V_5r4ctddt|}dj|Dcgc]\}}|	c}}}t||zcc}}w)Nzconflicting option string: %szconflicting option strings: %sr!)rrr*r)r+rconflicting_actionsr:rconflict_strings      r2_handle_conflict_errorz(_ActionsContainer._handle_conflict_errorks^:;235))(;%=)>&3%=>FGo$=>>%=sA

c|D]d\}}|jj||jj|d|jrJ|jj|fyr6)rrWrrrr)r+rr+rs    r2_handle_conflict_resolvez*_ActionsContainer._handle_conflict_resolvetsc&9		8!M6
!!((7''++M4@((  //7		8r4r6)r$r=r>r`rrrrrrrrrrrrrrrr-r/rdres@r2rrMsc01j!C5.1(f

*%&<P:  FD<:6?8r4rc>eZdZdfd	ZfdZfdZfdZxZS)rc|j}|d|j|d|j|d|jtt
|}|dd|i|||_g|_|j|_	|j|_
|j|_|j|_|j|_
|j|_y)Nrrrrr<)rrrrr]rr`rrrrrrrr)r+rrrrr
super_initr`s       r2r`z_ArgumentGroup.__init__s""!9#=#=>~y556!9#=#=>>49
5{5f5
 %00!**
&/&F&F#",,44	
+*3*N*N'r4cdtt||}|jj	||Sr6)r]rrrr&r+rr`s  r2rz_ArgumentGroup._add_actions-~t8@""6*
r4cbtt|||jj	|yr6)r]rrrrWr4s  r2rz_ArgumentGroup._remove_actions&
nd26:""6*r4cZtjdtdt||i|S)Nz&Nesting argument groups is deprecated.rFcategory
stacklevel)r[warnDeprecationWarningr]rr+rsrr`s   r2rz!_ArgumentGroup.add_argument_groups/

4'	

w)4:6::r4NN)r$r=r>r`rrrrdres@r2rrsO,
+;;r4rc6eZdZdfd	ZdZdZfdZxZS)rcHtt||||_||_yr6)r]rr`r
_container)r+rrr`s   r2r`z _MutuallyExclusiveGroup.__init__s!
%t5i@ 
#r4c|jrtd}t||jj	|}|j
j
||S)Nz-mutually exclusive arguments must be optional)rrrr@rrr&)r+rrs   r2rz#_MutuallyExclusiveGroup._add_actionsK??CDCS/!,,V4""6*
r4cp|jj||jj|yr6)r@rrrWrs  r2rz&_MutuallyExclusiveGroup._remove_actions(&&v.""6*r4cZtjdtdt||i|S)Nz0Nesting mutually exclusive groups is deprecated.rFr7)r[r:r;r]rr<s   r2rz4_MutuallyExclusiveGroup.add_mutually_exclusive_groups/

>'	

w3TDVDDr4)F)r$r=r>r`rrrrdres@r2rrs$
+EEr4rc
eZdZdZddddgedddddddf
fd	ZdZdZd	Zd
Z	dZ
d#dZd#d
ZdZ
dZdZdZdZdZdZdZd#dZd#dZdZdZdZdZdZdZd$dZd$dZd$d Zd%d!Z d"Z!xZ"S)&raKObject for parsing command line strings into Python objects.

    Keyword Arguments:
        - prog -- The name of the program (default:
            ``os.path.basename(sys.argv[0])``)
        - usage -- A usage message (default: auto-generated from arguments)
        - description -- A description of what the program does
        - epilog -- Text following the argument descriptions
        - parents -- Parsers whose arguments should be copied into this one
        - formatter_class -- HelpFormatter class for printing help messages
        - prefix_chars -- Characters that prefix optional arguments
        - fromfile_prefix_chars -- Characters that prefix files containing
            additional arguments
        - argument_default -- The default value for all arguments
        - conflict_handler -- String indicating how to handle conflicts
        - add_help -- Add a -h/-help option
        - allow_abbrev -- Allow long options to be abbreviated unambiguously
        - exit_on_error -- Determines whether or not ArgumentParser exits with
            error info when an error occurs
    NrrTc	tt|
}||||	|
|0tjjtjd}||_||_	||_
||_||_||_
||_|
|_|j }|t#d|_|t#d|_d|_d}|j+dd|d|vrdn|d}|jr,|j-|dz|d	zd
zd
t.t#d|D];}|j1|	|j2}|j2j5|=y#t6$rYJwxYw)
N)rrrrrzpositional argumentsoptionsc|Sr6r<)rs r2identityz)ArgumentParser.__init__.<locals>.identitysMr4r#rhrFrzshow this help message and exit)rrr)r]rr`_ospathbasenamerargvr\repilogformatter_classfromfile_prefix_charsadd_helpallow_abbrev
exit_on_errorrr_positionals
_optionals_subparsersrrrrrrr)r+r\rrrNparentsrOrrPrrrQrRrS	superinit	add_grouprHdefault_prefixrldefaultsr`s                    r2r`zArgumentParser.__init__su.$8	k+#3#3	5<88$$TYYq\2D	
.%:" 
(*++	%a(>&?@#AiL1	

fdH-!$| 3a==s"N1$4V$;x89

;	0F''/
0!++%%h/	0"

s5E	E+*E+cLgd}|Dcgc]}|t||fc}Scc}w)N)r\rrrOrrQrCrEs   r2r(zArgumentParser._get_kwargs!s+
9>>wtT*+>>>rGc|j|jtd|jdt	|d|vsd|vrNt|jdd}t|jdd}|j
|||_n|j|_|jdk|j}|j}|j}|j|j||d|jj|d<|j!|d}|d
d	gi|}|jj#||S)Nz(cannot have multiple subparser argumentsrrrsubcommandsr\rorrr<)rVrrrr#rrrTrr_get_positional_actionsrrrrvrrr)	r+rrrrkrr
parsers_classrs	         r2add_subparserszArgumentParser.add_subparsers/s>'JJqCDE	.$t*5f
 7fjj-89EFJJ}d;<K#66ukJD#00D::f%++-I668K44F

KD&224::<F6N..vyA
;b;F;$$V,
r4c|jr|jj||S|jj||Sr6)rrUrrTrs  r2rzArgumentParser._add_actionNs?  OO''/

))&1
r4cX|jDcgc]}|jr|c}Scc}wr6rrrs  r2_get_optional_actionsz$ArgumentParser._get_optional_actionsUs/"mm*((*	**'cX|jDcgc]}|js|c}Scc}wr6rdrs  r2r_z&ArgumentParser._get_positional_actionsZs/"mm.,,.	..rfc|j||\}}|r.td}|j|dj|z|SNzunrecognized arguments: %sr)rrrr*r+rsrMrMrs     r2
parse_argszArgumentParser.parse_argsbsD**4;
d01CJJsSXXd^+,r4c|tjdd}nt|}|
t}|jD]`}|j
tust||j
r-|jtus@t||j
|jb|jD])}t||rt|||j|+|jr	|j||\}}n|j||\}}t|t r/|j#t%|t t'|t ||fS#t$r$}|jt|Yd}~kd}~wwxYwrb)rrMr7rrrrrrrbrrS_parse_known_argsrrrrrrDdelattr)r+rsrMrrerrs      r2rzArgumentParser.parse_known_argsisL<99QR=D:D!Imm	HF{{(*y&++6~~X5	6;;G		HNN	?D9d+	4)=>	?

%"&"8"8y"I	4#44T9EOIt956KK	+BCDI67$!
%

3s8$$
%s"E	E=E88E=c	X !"jjijD]h}|j}t	|jD]B\}}j|g}|j
|d||j
||dzdDjig}t}	t	|	D]b\}}
|
dk(r*|jd|	D]}
|jd5j|
}|d}n||<d}|j|ddj|t t!d !fd	""fd}
j"fd	}gd
}rt}nd}||kr_tDcgc]	}||k\r|c}}||k7r||}||kDr|}8|}|vr||}j
||}|
|}||kr_||}j
|dg}jD]}| vs|j r|jt#|/|j$<t'|j$t(sWt+|j,sn|j$t/|j,ust1|j,j3||j$|r,j5t7dd
j|zjD]}|j s|jD]}|!vs&|jDcgc]}|j8t:urt#|!}}t7d}j5|dj|zfScc}wcc}w)NrcrSrAOroc2	j|j||}||jurQ
j|j|gD]+}|
vst	d}t|}t
|||z|tur|||yy)Nznot allowed with argument %s)r_get_valuesrrrr6rr)rargument_stringsrargument_valuesconflict_actionraction_nameaction_conflictsrMseen_actionsseen_non_default_actionsr+s       r2take_actionz5ArgumentParser._parse_known_args.<locals>.take_actionsV$"..v7GHO
fnn4(,,V4'7';';FB'GGO&*BB >?&6&G+FC+4EFF	Gh.tYG/r4c|}|\}}}j}g}	|j||dzS|||d}j}|dk(rh|d|vra|dk7r\|j|g|f|d}	|	|dz}|ddxsd}
j}||vr||}|
}nt	d}t|||z|dk(r|dz}
|g}|j|||fnNt	d}t|||z|dz}|d}|||}||z}
||
}|j|||fn|sJ|D]\}}}||||
S)Nrcrqrrozignored explicit argument %r)_match_argumentr&rrrr)start_indexoption_tuplerrexplicit_argmatch_argument
action_tuples	arg_countrcharnew_explicit_arg
optionals_maprstoprsrselected_patternsr-arg_strings_patternextrasoption_string_indicesr+r|s                 r2consume_optionalz:ArgumentParser._parse_known_args.<locals>.consume_optionals1=L2>/FM<"11NM>MM+k":;&?* + .vs ;I
!--E!Q)!,E9(B.%,,fb--HI,Q/(,|A(>
+7+;+Ct((,(C(C
(M9%2=%AF+;L"#$B"CC"/l8J"KK#a*Q ,~%,,fdM-JK
  >?+FC,4FGG(!OE(;EF(C% .v7H II 9,D&uT2D!((&$
)FGsz! /<
9+mFD-8
9Kr4c
j}|d}|	|}t	|D]\}}|||z}||z
}||	t|d	dd|Sr6)_match_arguments_partialzipr)r
match_partialselected_pattern
arg_countsrrrsr-rrr+r|s       r2consume_positionalsz=ArgumentParser._parse_known_args.<locals>.consume_positionals$s 99M2;<@&{4DEJ&)j%A
*!	";i0GHy(FD)
*)Z)9:KNr4rrz(the following arguments are required: %sr!z#one of the arguments %s is requiredrr6)rP_read_args_from_filesrrrrriterr&_parse_optionalr*rr_rNrMrrr6rrrrrrDrb
_get_valuerrrr)#r+r-rMrrrmutex_action	conflictsarg_string_pattern_partsarg_strings_iter
arg_stringrpatternrrrmax_option_string_indexrnext_option_string_indexpositionals_end_indexstrings
stop_indexrequired_actionsrrrFrryrrrrrzr{r|s#```                        @@@@@@@@r2rmz ArgumentParser._parse_known_argss%%144[AK::	8K'66M#,[-G-G#H
8<,77bI	  r!23  q1uv!67
8	8!##% ,&'78	9MAzT!(//4"29J,33C89 $33J?'!G/;)!,!G(//8#	9(!gg&>?u#&5 	H	H*J	J	\224		( &)*?&@#&(#44(+2,)K',)(*$66(;K(H%);6"7K"7K"77%k2JK

g&6+;7K544:)5
	

k*+./mm	IF\)??$++,<V,DE2"6>>37	6;;7')V[[*II	6;; $ GI	I JJqCDyy!123
444	6E~~#22
6F!99
6,1+?+?=!' &8 ;.f5=E=ABCJJsSXXe_45	6&  M,)~=sN"$N'c6g}|D]}|r|d|jvr|j|(	t|ddtjtj
5}g}|j
jD])}|j|D]}|j|+|j|}|j|ddd|S#1swY
xYw#t$r%}|jt|Yd}~d}~wwxYw)Nrrc)rr)rPr&rrgetfilesystemencodinggetfilesystemencodeerrorsreadr&convert_arg_line_to_argsrrrrr)r+r-new_arg_stringsr	args_filearg_liner/ros        r2rz$ArgumentParser._read_args_from_filess%	)JAd6P6P!P&&z2)jn'+'A'A'C%)%C%C%EG<JS&((1(8(C(C(E8H'+'D'DX'N8 + 2 23 788'+&@&@&M'..{;<	),<<)JJs3x(()s05C*#A/CC*C'	#C**	D3DDc|gSr6r<)r+rs  r2rz'ArgumentParser.convert_arg_line_to_argss
zr4cx|j|}tj||}|xdtdttdt
tdi}|j
|j}|$tdd|j|jz}t||t|jdS)Nzexpected one argumentzexpected at most one argumentzexpected at least one argumentzexpected %s argumentzexpected %s argumentsrc)_get_nargs_patternrWrrrrrrrrrr)r+rr
nargs_patternrnargs_errorsrs       r2r~zArgumentParser._match_arguments//7
		-)<==a/0!;<Q?@L
""6<<0C{56%||-/5||< ,,5;;q>""r4c	\g}tt|ddD]}|d|}dj|Dcgc]}|j|c}}t	j
||}|O|j
|jD	cgc]
}	t|	c}	|S|Scc}wcc}	w)Nrrro)rrr*rrWrrr)
r+rrrr
actions_slicerrrrs
          r2rz'ArgumentParser._match_arguments_partialss7|Q+	A#BQKMgg-:<#) $66v><=GIIg':;E 

Hvs6{HI
	
<IsB$
B)
c
t|sy|d|jvry||jvr|j|}||dfSt|dk(ryd|vr7|jdd\}}||jvr|j|}|||fS|j	|}t|dkDrLdj|Dcgc]\}}}|
c}}}}||d}t
d}|j||znt|dk(r|\}	|	S|jj|r
|jsyd|vryd|dfScc}}}w)Nrrcrr!)rmatchesz4ambiguous option: %(option)s could match %(matches)sr)rrrsplit_get_option_tuplesr*rrrrr)
r+rrrr
option_tuplesrFrsrrs
          r2rzArgumentParser._parse_optionals!} 1 1144400<F:t++z?a**4*:*:3*B'M< ; ;;44]C}l:://
;
}!ii;H!J!J7FM<"/!JKG(W=DJKCJJsTz"
1
$)ML
((..z:66*Z%%3!Js2
D3cg}|j}|d|vr{|d|vrt|jrfd|vr|jdd\}}n|}d}|jD]9}|j	|s|j|}|||f}|j|;|S|d|vr|d|vr|}d}|dd}|dd}	|jD]d}||k(r&|j|}|||	f}|j|.|j	|s@|j|}|||f}|j|f|S|j
td|z|S)NrrcrrFzunexpected option string: %s)rrRrrrXr&rr)
r+rrr
option_prefixrrrshort_option_prefixshort_explicit_args
          r2rz!ArgumentParser._get_option_tuples	s!!u$q)9U)B  -'2?2E2Ec12M/M<$1M#'L%)%@%@+M$//
>!%!<!<]!K$m\A

c*	+<
+1

&=+;5+H)ML"/"3!.qr!2!%!<!<
'
 $77!88GF -1CCCMM#&"--m<!88GF -=CMM#&
'

JJq78=HI
r4cF|j}|d}n_|tk(rd}nS|tk(rd}nG|tk(rd}n;|tk(rd}n/|t
k(rd}n#|tk(rd}ndd	jd
|zz}|jr$|jd	d}|jdd}|S)
Nz(-*A-*)z(-*A?-*)z	(-*[A-]*)z
(-*A[A-]*)z([-AO]*)z(-*A[-AO]*)z(-*-*)z(-*%s-*)z-*rqror)
rrrrrrrr*rr!)r+rrrs    r2rz!ArgumentParser._get_nargs_pattern4	s=%Mh
&Ml
"'Mk
!(Mi
&Mf_)Mh
$M'3;)??M  )11$;M)11#r:Mr4c|j||\}}|r.td}|j|dj|z|Sri)parse_known_intermixed_argsrrr*rjs     r2parse_intermixed_argsz$ArgumentParser.parse_intermixed_argse	sD55dIF
d01CJJsSXXd^+,r4c|j}|Dcgc]}|jttfvr|}}|rt	d|djz|j
Dcgc]#}|jD]}||vr|j%c}}rt	d	|j}	|j|jdd|_|D]:}|j|_
t|_|j|_
t|_<|j||\}}|D]g}t||jst!||jgk(s4ddlm}	|	d|jd|t'||ji	|D]$}|j|_|j|_&	|j)}
	|
D]}|j*|_d|_|j
D]}|j*|_d|_|j||\}}|
D]}|j,|_|j
D]}|j,|_	||_||fScc}wcc}}w#|D]$}|j|_|j|_&wxYw#|
D]}|j,|_|j
D]}|j,|_wxYw#|_wxYw)	Nz3parse_intermixed_args: positional arg with nargs=%srz;parse_intermixed_args: positional in mutuallyExclusiveGroup)r:zDo not expect z in F)r_rrrrrrrrr
save_nargsrrsave_defaultrrrDr[r:rnrer
save_required)r+rsrMrrar
save_usageremaining_argsr:rrs            r2rz*ArgumentParser.parse_known_intermixed_argsl	s224"-
5 33
5
5--.qTZZ89
9&*%D%DIE..I&K2G
KKIKI67
7.	$J
9::%!%!2!2!4QR!8DJ).F(.F%#+FL*0..F'%-FN
.-1,A,A$BK-M)	>)8F	6;;7 '	6;; ? C1iPQ	6;;7
8*9F#)#4#4FL%+%8%8FN9224I
9(,F+1??F(&+FO,"<<+E*/..E'%*EN+%)$9$9.:C%E!	6(;F&,&:&:FO;!<<9E%*%8%8EN9$DJ&  u
5I:*9F#)#4#4FL%+%8%8FN9"(;F&,&:&:FO;!<<9E%*%8%8EN9$DJsU!I,$(I1K$)BI7=I76I7:K$	AJ%&:K$7+J""K$%<K!!K$$	K-cR|jttfvr	|jd|sn|jt
k(r[|jr
|j}n|j}t|tr$|j||}|j|||S|sO|jtk(r<|js0|j |j}|j|||S|}|St|dk(r>|jdt
fvr*|\}|j||}|j|||S|jtk(r!|Dcgc]}|j||}}|S|jtk(r6|Dcgc]}|j||}}|j||d|S|jtk(rt}|S|Dcgc]}|j||}}|D]}|j|||S#t$rYwxYwcc}wcc}wcc}w)NrSrcr)rrrrWrrrrArrrr_check_valuerrr)r+rr-r1rvs      r2rtzArgumentParser._get_values	s%<<	22
""4(
v||x7$$%%6!!&%0PI&,,,">''~~)!!&%0@9$83

"v||h7G'G%KJOOFJ7Efe,,'\\Y
&9DEAT__VQ/EEE$\\V
#9DEAT__VQ/EEEfeAh/\\X
%E:EEAT__VQ/EEE
-!!&!,
-g

BFFFs#H
HHH$
	HHc|jd|j|j}t|std}t	|||z	||}|S#t
$r}t
|}t	||d}~wttf$rJt|jdt|j}||d}td}t	|||zwxYw)Nr#z%r is not callabler$)r#r1z!invalid %(type)s value: %(value)r)rr#rrrrrrrrDr')	r+rrr	rrror0rss	         r2rzArgumentParser._get_value	s&&vv{{FKKH		"()Ci88
	4z*F
!	-c(C,,:&	46;;
D4EFD :6D78Cd
33		4sA	C!A88ACc|jU||jvrF|djtt|jd}t	d}t|||zyy)Nr!)r1rz3invalid choice: %(value)r (choose from %(choices)s))rr*rr'rr)r+rr1rsrs     r2rzArgumentParser._check_value
s^>>%%v~~*E"#yyT6>>)BCEDIJCd
33	+F%r4c|j}|j|j|j|j|jSr6)rrrrrrv)r+rks  r2rzArgumentParser.format_usage
sB'')	DJJ

 ;;	=$$&&r4c|j}|j|j|j|j|j|j|jD]c}|j|j|j|j|j|j|je|j|j|jSr6)rrrrrrrrr{rrrr}rNrv)r+rkaction_groups   r2rvzArgumentParser.format_help
s'')		DJJ

 ;;	=	4++,!//	$L##L$6$67|778##L$?$?@!!#		$	4;;'$$&&r4c:|j|jS)Nr)rOr\r:s r2rzArgumentParser._get_formatter4
s###33r4ch|tj}|j|j|yr6)rrrrr+files  r2print_usagezArgumentParser.print_usage:
s)<;;DD--/6r4ch|tj}|j|j|yr6)rrrrvrs  r2rzArgumentParser.print_help?
s)<;;DD,,.5r4c|r'|xstj}	|j|yy#ttf$rYywxYwr6)rstderrwriterr)r+r:rs   r2rzArgumentParser._print_messageD
sB&4;;D


7##G,

s+==cr|r |j|tjtj|yr6)rrrr)r+statusr:s   r2rzArgumentParser.exitO
s%5		&r4c|jtj|j|d}|j	dtd|zy)zerror(message: string)

        Prints a usage message incorporating the message to stderr and
        exits.

        If you override this in a subclass, it should not return -- it
        should either exit or raise an exception.
        )r\r:rFz%(prog)s: error: %(message)s
N)rrrr\rr)r+r:rss   r2rzArgumentParser.errorT
s=	
%		g6		!Q784?@r4r=r6)rN)#r$r=r>r?rr`r(rarrer_rkrrmrrr~rrrrrrrtrrrrvrrrrrrrdres@r2rrs,!!.!'+"&")"#=0D	?>*
.$Lx!t6#, 8&t+Z+bH!Z8t24''.47
6

Ar4r)4r?__version____all__osrJrerWsysrr[rrrrrrrrrrrrrCrr	r
rrr6	Exceptionrrr
rZrrgrnrtrzr}rrrrrrrrrrrrr<r4r2<module>rs;z,*		.v>	"EFEPQ-Q!6!M:$}$&?I?(			\@
\@@h6/F6/r .6 .F22.(")"#-F#-L--6161.&&V4bLbLH-M-1:v1:n$ $(s8s8l	';&';TEnE8VA%'8VAr4