%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/duplicity/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/duplicity/__pycache__/argparse311.cpython-312.pyc

�

�2e	z���dZdZgd�ZddlZddlZddlZddl	Z	ddl
m
ZmZdZ
dZdZd	Zd
ZdZdZGd
�de�Zd�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Zd�ZGd�de�ZGd�de�ZGd�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-�d.e �Z'Gd/�d0e �Z(Gd1�d2e �Z)Gd3�d4e �Z*Gd5�d6e �Z+Gd7�d8e&�Z,Gd9�d:e�Z-Gd;�d<e�Z.Gd=�d>e�Z/Gd?�d@e/�Z0GdA�dBe0�Z1GdC�dDee/�Z2y)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�
ArgumentError�ArgumentTypeError�BooleanOptionalAction�FileType�
HelpFormatter�ArgumentDefaultsHelpFormatter�RawDescriptionHelpFormatter�RawTextHelpFormatter�MetavarTypeHelpFormatter�	Namespace�Action�ONE_OR_MORE�OPTIONAL�PARSER�	REMAINDER�SUPPRESS�ZERO_OR_MORE�N)�gettext�ngettextz==SUPPRESS==�?�*�+zA...�...�_unrecognized_argsc�"�eZdZdZd�Zd�Zd�Zy)�_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__.
    c��t|�j}g}i}|j�D]}|jt	|���|j�D]1\}}|j
�r|j|�d|����-|||<�3|r|jdt	|�z�|�ddj|��d�S)N�=z**%s�(�, �))�type�__name__�	_get_args�append�repr�_get_kwargs�isidentifier�join)�self�	type_name�arg_strings�	star_args�arg�name�values       �7/usr/lib/python3/dist-packages/duplicity/argparse311.py�__repr__z_AttributeHolder.__repr__ws�����J�'�'�	����	��>�>�#�	*�C����t�C�y�)�	*��+�+�-�	(�K�D�%�� � �"��"�"�d�E�#:�;�"'�	�$��		(�
����v��Y��7�8�$�d�i�i��&<�=�=�c�H�t|jj��S�N)�list�__dict__�items�r+s r2r(z_AttributeHolder._get_kwargs�s���D�M�M�'�'�)�*�*r4c��gSr6�r:s r2r%z_AttributeHolder._get_args�s���	r4N)r$�
__module__�__qualname__�__doc__r3r(r%r<r4r2rrns���
>�+�r4rc�`�|�gSt|�tur|ddSddl}|j|�S�Nr)r#r7�copy)r9rBs  r2�_copy_itemsrC�s5���}��	��E�{�d���Q�x����9�9�U��r4c���eZdZdZdd�Zd�Zd�ZGd�de�Zd�Z	d	�Z
d
�Zd�Zd d�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)!rz�Formatter 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}|j�j}|dz}||_||_t|t
|dz
|dz��|_||_d|_	d|_
d|_|j|d�|_
|j|_tj dtj"�|_tj d�|_y)Nr��z\s+z\n\n\n+)�shutil�get_terminal_size�columns�_prog�_indent_increment�min�max�_max_help_position�_width�_current_indent�_level�_action_max_length�_Section�
_root_section�_current_section�_re�compile�ASCII�_whitespace_matcher�_long_break_matcher)r+�prog�indent_increment�max_help_position�widthrHs      r2�__init__zHelpFormatter.__init__�s����=���,�,�.�6�6�E��Q�J�E���
�!1���"%�&7��U�R�Z�IY�\]�I]�9^�"_������ ������"#���!�]�]�4��6��� $� 2� 2���#&�;�;�v�s�y�y�#A�� �#&�;�;�z�#:�� r4c�l�|xj|jz
c_|xjdz
c_y�N��rQrLrRr:s r2�_indentzHelpFormatter._indent�s'������ 6� 6�6�����q��r4c��|xj|jzc_|jdk\sJd��|xjdzc_y)NrzIndent decreased below 0.rcrdr:s r2�_dedentzHelpFormatter._dedent�sA������ 6� 6�6���#�#�q�(�E�*E�E�(����q��r4c��eZdZdd�Zd�Zy)�HelpFormatter._SectionNc�<�||_||_||_g|_yr6)�	formatter�parent�headingr9)r+rkrlrms    r2r`zHelpFormatter._Section.__init__�s��&�D�N� �D�K�"�D�L��D�Jr4c	���|j�|jj�|jj}||jD��cgc]
\}}||���c}}�}|j�|jj�|sy|jtur5|j�)|jj}d|d|jfz}nd}|d||dg�Scc}}w)N�z%*s%s:
�
)	rlrkre�_join_partsr9rgrmrrQ)r+r*�func�args�	item_help�current_indentrms       r2�format_helpz"HelpFormatter._Section.format_help�s����{�{�&����&�&�(��>�>�-�-�D��D�J�J�G�j�d�D�d�D�k�G�H�I��{�{�&����&�&�(����|�|�8�+����0H�!%���!?�!?��$���D�L�L�'I�I������w�	�4�8�9�9��!Hs�C#
r6)r$r=r>r`rvr<r4r2rTri�s��	�	:r4rTc�R�|jjj||f�yr6)rVr9r&)r+rrrss   r2�	_add_itemzHelpFormatter._add_item�s �����#�#�*�*�D�$�<�8r4c��|j�|j||j|�}|j|jg�||_yr6)rerTrVrxrv)r+rm�sections   r2�
start_sectionzHelpFormatter.start_section�s?�������-�-��d�&;�&;�W�E�����w�*�*�B�/� '��r4c�Z�|jj|_|j�yr6)rVrlrgr:s r2�end_sectionzHelpFormatter.end_section�s�� $� 5� 5� <� <������r4c�V�|tur!|�|j|j|g�yyyr6)rrx�_format_text)r+�texts  r2�add_textzHelpFormatter.add_text�s-���x��D�$4��N�N�4�,�,�t�f�5�%5�r4c�Z�|tur#||||f}|j|j|�yyr6)rrx�
_format_usage)r+�usage�actions�groups�prefixrss      r2�	add_usagezHelpFormatter.add_usage�s1���� ��'�6�6�1�D��N�N�4�-�-�t�4�!r4c�n�|jtur�|j}||�g}|j|�D]}|j	||���tt
t|��}||jz}t|j|�|_	|j|j|g�yyr6)�helpr�_format_action_invocation�_iter_indented_subactionsr&rN�map�lenrQrSrx�_format_action)r+�action�get_invocation�invocations�	subaction�invocation_length�
action_lengths       r2�add_argumentzHelpFormatter.add_arguments����;�;�h�&�!�;�;�N�)�&�1�2�K�!�;�;�F�C�
>�	��"�"�>�)�#<�=�
>�!$�C��[�$9� :��-��0D�0D�D�M�&)�$�*A�*A�=�&Q�D�#�
�N�N�4�.�.���9�'r4c�4�|D]}|j|��yr6)r�)r+r�r�s   r2�
add_argumentszHelpFormatter.add_argumentss���	&�F����f�%�	&r4c��|jj�}|r0|jjd|�}|j	d�dz}|S)N�

rp)rUrvr[�sub�strip)r+r�s  r2rvzHelpFormatter.format_helpsI���!�!�-�-�/����+�+�/�/���=�D��:�:�d�#�d�*�D��r4c�b�dj|D�cgc]}|s�|tus�|��c}�Scc}w)Nro)r*r)r+�part_strings�parts   r2rqzHelpFormatter._join_partss(���w�w��W���$�h�BV��W�X�X��Ws�,�,�,c����|�td�}|�|t|j��z}�nB|�|sdt|j��z}�n#|�� dt|j��z}g}g}|D]1}|jr|j	|��!|j	|��3|j
}	|	||z|�}
dj
||
fD�cgc]}|s�|��	c}�}|j|jz
�t|�t|�z�kD�r]d}|	||�}
|	||�}tj||
�}tj||�}dj
|�|
k(sJ�dj
|�|k(sJ�d�fd�	}t|�t|�zd�zkr[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+c���g}g}|�t|�dz
}nt|�dz
}|D]m}|dzt|�z�kDr5|r3|j|dj|�z�g}t|�dz
}|j|�|t|�dzz
}�o|r#|j|dj|�z�|�|dt|�d|d<|S)Nrcr�r)r�r&r*)�parts�indentr��lines�line�line_lenr��
text_widths       �r2�	get_linesz.HelpFormatter._format_usage.<locals>.get_linesLs�����E��D��)�#&�v�;��?��#&�v�;��?�� %�2��#�a�<�#�d�)�3�j�@�T�!�L�L��#�(�(�4�.�)@�A�#%�D�'*�6�{�Q��H����D�)� �C��I��M�1��
2�����V�c�h�h�t�n�%<�=��)�#(��8�C��K�M�#:��a�� �Lr4g�?rcrpr�r6)
�_�dictrK�option_stringsr&�_format_actions_usager*rPrQr�rW�findall�extend)r+r�r�r�r�r\�	optionals�positionalsr��format�action_usage�s�part_regexp�	opt_usage�	pos_usage�	opt_parts�	pos_partsr�r�r�r�r�s                     @r2r�zHelpFormatter._format_usage!s�����>��y�\�F����D�d�j�j�1�1�E��]�7���4�:�:�!6�6�E��]���$�*�*� 5�5�D��I��K�!�
/���(�(��$�$�V�,��&�&�v�.�	
/��/�/�F�!�)�k�"9�6�B�L��H�H�$��)=�C�A��a�C�D�E����t�';�';�;�J��6�{�S��Z�'�*�4�N��"�9�f�5�	�"�;��7�	��K�K��Y�?�	��K�K��Y�?�	��x�x�	�*�i�7�7�7��x�x�	�*�i�7�7�7�!�*�v�;��T��*�d�Z�.?�?� �C��K�#�d�)�$;�a�$?�@�F� � )�4�&�9�*<�f�f� M�����Y�y�&�%A�B�"� )�4�&�9�*<�f�f� M��!%���!�3�v�;�.�F�%�	�1�E�%�e�V�4�E��5�z�A�~� "�����Y�y�&�%A�B����Y�y�&�%A�B�!�F�U�N�E��	�	�%�(��$�U�+�+��{Ds�
I5�I5c���t�}i}|D�]1}|jstd|����	|j|jd�}t	|j�}||z}||||jk(s�jd}	|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|dz�d
k(s�h|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)|d��D]}||g|
||�
dj+|
D�cgc]}|��|��	c}�}d}d}t-j.d|zd|�}t-j.d|zd|�}t-j.|�d|��d|�}|j1�}|S#t$rY��JwxYwcc}w)Nzempty group rrcz [�[�]z (r r"�|���r��[%s]T)�reversez[\[(]z[\])]z(%s) z\1� (%s)z *ro)�set�_group_actions�
ValueError�indexr��addr�r�required�range�	enumerater&�get�popr��#_get_default_metavar_for_positional�_format_args�nargs�format_usage�!_get_default_metavar_for_optional�sortedr*rWr�r�)r+r�r��
group_actions�inserts�group�start�group_action_count�end�suppressed_actions_countr��exposed_actions_count�ir��defaultr��
option_string�args_string�itemr��open�closes                      r2r�z#HelpFormatter._format_actions_usage|s�����
����'	)�E��'�'� �<��w�!7�8�8�#
)��
�
�e�&:�&:�1�&=�>��&)��)=�)=�%>�"��0�0���5��%��)=�)=�=�/0�,�"'�"6�"6�:��%�)�)�&�1�!�;�;�(�2�4��9�4�:�
-?�AY�,Y�)� �>�>� �G�+�#�E�N�d�2�N�-0�G�E�N��'�>�#�C�L�C�/�L�+.�G�C�L�.��2� �G�+�#�E�N�d�2�N�-0�G�E�N��'�>�#�C�L�C�/�L�+.�G�C�L�"�5�1�9�c�2�)��%(���
�)�M'	)�T��"�7�+�,	#�I�A�v��{�{�h�&����T�"��;�;�q�>�S�(��K�K��N��[�[��Q��'�3�.��K�K��A��&��*�*��B�B�6�J���(�(���9���]�*��A�w�#�~�$�r�(�c�/�#�A�b�z�����T�"�!'� 5� 5�a� 8�
��<�<�1�$�!�.�.�0�D�
#�D�D�V�L�G�"&�"3�"3�F�G�"D�K�&3�[�A�D����6��+F�!�D�=�D����T�"�Y,	#�^���.�	&�A�!�!�*��E�!�A�J�	&��x�x�%�D�$�4�3C��D�E�������w�w�x�$���t�4���w�w�x�%�'���5���w�w�D�%�0�#�t�<���z�z�|�����G�
��
��pEs�M
�M�M�
	M�Mc���d|vr|t|j��z}t|j|jz
d�}d|jz}|j|||�dzS)Nz%(prog)r��r�r�)r�rKrNrPrQ�
_fill_text)r+r�r�r�s    r2rzHelpFormatter._format_text�s`������$�D�J�J�/�/�D�����t�';�';�;�R�@�
��t�+�+�+�����t�Z��8�6�A�Ar4c�`�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{|jj�ra|j|�}	|	rp|j|	|�}
|jdd|
dfz�|
ddD]}|jd|d|fz��n"|jd�s|jd�|j|�D]"}|j|j|���$|j!|�S)	NrFr�roz%*s%s
z	%*s%-*s  rrcrp)rMrSrOrNrPrQr�r�r�r��_expand_help�_split_linesr&�endswithr�r�rq)
r+r��
help_position�
help_width�action_width�
action_header�tup�indent_firstr��	help_text�
help_linesr�r�s
             r2r�zHelpFormatter._format_action�s����D�3�3�a�7��9P�9P�Q�
�����}�4�b�9�
�$�t�';�';�;�a�?���6�6�v�>�
��{�{��&�&��M�9�C�%��O�M���
�<�
/��&�&��L�-�G�C�'�#�-�M��L��&�&��M�9�C�%��O�M�(�L�����;�;�6�;�;�,�,�.��)�)�&�1�I��!�.�.�y�*�E�
����Y�,��J�q�M�)J�J�K�&�q�r�N�H�D��L�L��m�R��-F�!F�G�H��'�'��-��L�L����7�7��?�	9�I��L�L��,�,�Y�7�8�	9�����&�&r4c��|js-|j|�}|j||�d�\}|Sg}|jdk(r|j	|j�nJ|j|�}|j
||�}|jD]}|j|�d|����dj|�S)Nrcrr�r!)	r�r��_metavar_formatterr�r�r�r�r&r*)r+r�r��metavarr�r�r�s       r2r�z'HelpFormatter._format_action_invocation!s����$�$��>�>�v�F�G�A��0�0���A�!�D�J�W��N��E��|�|�q� ����V�2�2�3�
�@�@��H��"�/�/���@��%+�%:�%:�I�M��L�L�M�;�!G�H�I��9�9�U�#�#r4c����|j�
|j�nE|j�7|jD�cgc]
}t|���}}ddj|�z�n|��fd�}|Scc}w)Nz{%s}�,c�4��t�t�r�S�f|zSr6)�
isinstance�tuple)�
tuple_size�results �r2r�z0HelpFormatter._metavar_formatter.<locals>.formatBs����&�%�(��
��y�:�-�-r4)r��choices�strr*)r+r��default_metavar�choice�choice_strsr�r�s      @r2r�z HelpFormatter._metavar_formatter9se����>�>�%��^�^�F�
�^�^�
'�5;�^�^�D�6�3�v�;�D�K�D��c�h�h�{�3�3�F�$�F�	.��
��Es�A'c��|j||�}|j�
d|d�z}|S|jtk(r
d|d�z}|S|jtk(r$|d�}t	|�dk(rd|z}|Sd|z}|S|jt
k(r
d|d�z}|S|jtk(rd}|S|jtk(r
d	|d�z}|S|jtk(rd
}|S	t|j�D�cgc]}d��}}dj|�||j�z}|Scc}w#t$r
td�d�wxYw)
Nz%srcr�rFz
[%s [%s ...]]z[%s ...]z%s [%s ...]rz%s ...rozinvalid nargs valuer�)
r�r�rrr�rrrrr��	TypeErrorr�r*)r+r�r��get_metavarr�r�r��formatss        r2r�zHelpFormatter._format_argsJs����-�-�f�o�F���<�<���K��N�*�F�.�
�-�\�\�X�
%��k�!�n�,�F�*�
�)�\�\�\�
)�!�!�n�G��7�|�q� �(�7�2��"�
�$�g�-���
��\�\�[�
(�"�[��^�3�F��
��\�\�Y�
&��F��
��\�\�V�
#���A��.�F��
��\�\�X�
%��F��
�
B�).�v�|�|�)<�=�A�4�=��=��X�X�g�&��V�\�\�)B�B�F��
��	>���
B� �!6�7�T�A�
B�s�2D?�		D:�D?�:D?�?Ec��tt|�|j��}t|�D]}||tus�||=�t|�D]$}t||d�s�||j||<�&|jd��0dj|dD�cgc]
}t|���c}�}||d<|j|�|zScc}w)Nr�r$r�r!)r��varsrKr7r�hasattrr$r�r*r��_get_help_string)r+r��paramsr0�c�choices_strs      r2r�zHelpFormatter._expand_helpfs����d�6�l����4����L�	!�D��d�|�x�'��4�L�	!���L�	5�D��v�d�|�Z�0�%�d�|�4�4��t��	5��:�:�i� �,��)�)�V�I�5F�$G��S��V�$G�H�K� +�F�9���$�$�V�,�v�5�5��%Hs�Cc#�K�	|j}|j�|�Ed{���|j�y7�#t$rYywxYw�wr6)�_get_subactionsrerg�AttributeError)r+r��get_subactionss   r2r�z'HelpFormatter._iter_indented_subactionsssN����	�#�3�3�N�
�L�L�N�%�'�'�'��L�L�N�
(��	�	��	�s1�A�A�A�A�A�	A�A�
A�Ac��|jjd|�j�}ddl}|j	||�S)Nr�r)rZr�r��textwrap�wrap)r+r�r_rs    r2r�zHelpFormatter._split_lines}s9���'�'�+�+�C��6�<�<�>��	��}�}�T�5�)�)r4c��|jjd|�j�}ddl}|j	||||��S)Nr�r)�initial_indent�subsequent_indent)rZr�r�r�fill)r+r�r_r�rs     r2r�zHelpFormatter._fill_text�s>���'�'�+�+�C��6�<�<�>����}�}�T�5��SY�}�Z�Zr4c��|jSr6)r��r+r�s  r2rzHelpFormatter._get_help_string�����{�{�r4c�6�|jj�Sr6)�dest�upperrs  r2r�z/HelpFormatter._get_default_metavar_for_optional�s���{�{� � �"�"r4c��|jSr6)rrs  r2r�z1HelpFormatter._get_default_metavar_for_positional�rr4)rF�Nr6) r$r=r>r?r`rerg�objectrTrxr{r}r�r�r�r�rvrqr�r�rr�r�r�r�r�r�r�r�rr�r�r<r4r2rr�s����;�4��
:�6�:�<9�(��6�5�
:� &��Y�Y,�vm�^B�-'�^$�0�"�86��*�[��#�r4rc��eZdZdZd�Zy)r	z�Help 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.
    c�X��dj�fd�|jd��D��S)Nroc3�(�K�|]	}�|z���y�wr6r<)�.0r�r�s  �r2�	<genexpr>z9RawDescriptionHelpFormatter._fill_text.<locals>.<genexpr>�s�����P��v��}�P�s�T)�keepends)r*�
splitlines)r+r�r_r�s   `r2r�z&RawDescriptionHelpFormatter._fill_text�s#����w�w�P����$��1O�P�P�Pr4N)r$r=r>r?r�r<r4r2r	r	�s
���Qr4r	c��eZdZdZd�Zy)r
z�Help 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�"�|j�Sr6)r%)r+r�r_s   r2r�z!RawTextHelpFormatter._split_lines�s����� � r4N)r$r=r>r?r�r<r4r2r
r
�s���!r4r
c��eZdZdZd�Zy)rz�Help 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))r�r�rrrr�r�)r+r�r��defaulting_nargss    r2rz.ArgumentDefaultsHelpFormatter._get_help_string�s[���{�{���<��D��t�#��~�~�X�-�$,�l�#;� ��(�(�F�L�L�<L�,L��5�5�D��r4N)r$r=r>r?rr<r4r2rr�s���r4rc��eZdZdZd�Zd�Zy)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�.�|jjSr6�r#r$rs  r2r�z:MetavarTypeHelpFormatter._get_default_metavar_for_optional�����{�{�#�#�#r4c�.�|jjSr6r-rs  r2r�z<MetavarTypeHelpFormatter._get_default_metavar_for_positional�r.r4N)r$r=r>r?r�r�r<r4r2rr�s���$�$r4rc�2�|�y|jrdj|j�S|jdtfvr|jS|jdtfvr|jS|j
r!ddj|j
�zdzSy)N�/�{r��})r�r*r�rrr�)�arguments r2�_get_action_namer5�s������	�	 �	 ��x�x��/�/�0�0�	�	�	�$��!1�	1�����	���t�X�.�	.��}�}��	�	�	��S�X�X�h�.�.�/�/�#�5�5�r4c��eZdZdZd�Zd�Zy)rz�An 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.
    c�2�t|�|_||_yr6)r5�
argument_name�message)r+r4r9s   r2r`zArgumentError.__init__�s��-�h�7�����r4c�~�|j�d}ntd�}|t|j|j��zS)Nz%(message)sz'argument %(argument_name)s: %(message)s)r9r8)r8r�r�r9)r+r�s  r2�__str__zArgumentError.__str__�s:�����%�"�F��@�A�F���T�\�\��AS�AS�T�T�Tr4N)r$r=r>r?r`r;r<r4r2rr�s����Ur4rc��eZdZdZy)rz@An error from trying to convert a command line string to a type.N)r$r=r>r?r<r4r2rr�s��J�r4rc�<�eZdZdZ								dd�Zd�Zd�Zdd�Zy)	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�
r�rr��constr�r#r�r�r�r�)r+r�rr�r@r�r#r�r�r�r�s           r2r`zAction.__init__;sK��-�����	���
���
������	���� ��
���	���r4c�L�gd�}|D�cgc]}|t||�f��c}Scc}w)Nr?��getattr�r+�namesr0s   r2r(zAction._get_kwargsSs+��
��9>�>���w�t�T�*�+�>�>��>��!c� �|jdSrA)r�r:s r2r�zAction.format_usagebs���"�"�1�%�%r4c�*�ttd���)Nz.__call__() not defined)�NotImplementedErrorr��r+�parser�	namespace�valuesr�s     r2�__call__zAction.__call__es��!�!�$=�">�?�?r4�NNNNNFNNr6)r$r=r>r?r`r(r�rNr<r4r2r
r
s7��0�l���
���
���0
?�&�@r4r
c�0��eZdZ	d�fd�	Zdd�Zd�Z�xZS)rc	���g}	|D]>}
|	j|
�|
jd�s�&d|
ddz}
|	j|
��@t�|�
|	|d||||||��	y)N�--�--no-rFr)	r�rr�r�r#r�r�r�r�)r&�
startswith�superr`)r+r�rr�r#r�r�r�r��_option_stringsr��	__class__s           �r2r`zBooleanOptionalAction.__init__js������+�	6�M��"�"�=�1��'�'��-� '�-���*;� ;�
��&�&�}�5�	6�	���*���������	�
	
r4c�p�||jvr(t||j|jd��yy)NrS)r��setattrrrTrJs     r2rNzBooleanOptionalAction.__call__�s3���D�/�/�/��I�t�y�y�m�.F�.F�w�.O�*O�P�0r4c�8�dj|j�S)Nz | )r*r�r:s r2r�z"BooleanOptionalAction.format_usage�s���z�z�$�-�-�.�.r4)NNNFNNr6)r$r=r>r`rNr��
__classcell__�rWs@r2rris���nr�
�.Q�/r4rc�8��eZdZ								d�fd�	Zdd�Z�xZS)�_StoreActionc���|dk(rtd��|�|tk7rtdtz��tt|�|||||||||	|
��
y)Nrz�nargs 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?)r�rrUr^r`�r+r�rr�r@r�r#r�r�r�r�rWs           �r2r`z_StoreAction.__init__�sp����A�:��>��
�
���(�!2��?�(�J�K�K�
�l�D�*�)����������	+�	
r4c�2�t||j|�yr6)rYrrJs     r2rNz_StoreAction.__call__�s���	�4�9�9�f�-r4rOr6�r$r=r>r`rNr[r\s@r2r^r^�s(���
���
���
�� 
�D.r4r^c�(��eZdZd�fd�	Zdd�Z�xZS)�_StoreConstActionc	�:��tt|�||d||||��y)Nr)r�rr�r@r�r�r�)rUrer`�	r+r�rr@r�r�r�r�rWs	        �r2r`z_StoreConstAction.__init__�s-���
���/�)�������	0�	
r4c�F�t||j|j�yr6)rYrr@rJs     r2rNz_StoreConstAction.__call__�s���	�4�9�9�d�j�j�1r4�NNFNNr6rcr\s@r2rere�s
���	
�2r4rec� ��eZdZd�fd�	Z�xZS)�_StoreTrueActionc�8��tt|�||d|||��y)NT�r�rr@r�r�r�)rUrkr`�r+r�rr�r�r�rWs      �r2r`z_StoreTrueAction.__init__�s'���
���.�)��D�'�\d�ko�	/�	
r4)FFN�r$r=r>r`r[r\s@r2rkrk��
���
�
r4rkc� ��eZdZd�fd�	Z�xZS)�_StoreFalseActionc�8��tt|�||d|||��y)NFrm)rUrrr`rns      �r2r`z_StoreFalseAction.__init__�s'���
���/�)��E�7�]e�lp�	0�	
r4)TFNror\s@r2rrrr�rpr4rrc�8��eZdZ								d�fd�	Zdd�Z�xZS)�
_AppendActionc���|dk(rtd��|�|tk7rtdtz��tt|�|||||||||	|
��
y)Nrz�nargs for append actions must be != 0; if arg strings are not supplying the value to append, the append const action may be more appropriater`r?)r�rrUrur`ras           �r2r`z_AppendAction.__init__�sq����A�:��B��
�
���(�!2��?�(�J�K�K�
�m�T�+�)����������	,�	
r4c��t||jd�}t|�}|j|�t	||j|�yr6)rCrrCr&rY�r+rKrLrMr�r9s      r2rNz_AppendAction.__call__��:���	�4�9�9�d�3���E�"��
���V���	�4�9�9�e�,r4rOr6rcr\s@r2ruru�s(���
���
���
�� 
�D-r4ruc�(��eZdZd�fd�	Zdd�Z�xZS)�_AppendConstActionc
�<��tt|�||d|||||��y)Nr)r�rr�r@r�r�r�r�)rUr{r`rgs	        �r2r`z_AppendConstAction.__init__�s0���
� �$�0�)��������	1�		
r4c��t||jd�}t|�}|j|j�t||j|�yr6)rCrrCr&r@rYrxs      r2rNz_AppendConstAction.__call__s>���	�4�9�9�d�3���E�"��
���T�Z�Z� ��	�4�9�9�e�,r4rir6rcr\s@r2r{r{�s
���

�-r4r{c�(��eZdZd�fd�	Zdd�Z�xZS)�_CountActionc�8��tt|�||d|||��y)Nr)r�rr�r�r�r�)rUrr`rns      �r2r`z_CountAction.__init__
s&���
�l�D�*�)��A�w�Ya�hl�	+�	
r4c�n�t||jd�}|�d}t||j|dz�y�Nrrc)rCrrY)r+rKrLrMr��counts      r2rNz_CountAction.__call__s2���	�4�9�9�d�3���=��E��	�4�9�9�e�a�i�0r4)NFNr6rcr\s@r2rrs
���
�
1r4rc�.��eZdZeedf�fd�	Zdd�Z�xZS)�_HelpActionNc�6��tt|�|||d|��y�Nr)r�rr�r�r�)rUr�r`)r+r�rr�r�rWs     �r2r`z_HelpAction.__init__s ���
�k�4�)��d�\c�kl�sw�)�xr4c�D�|j�|j�yr6)�
print_help�exitrJs     r2rNz_HelpAction.__call__s���������
r4r6�r$r=r>rr`rNr[r\s@r2r�r�s���,4�h�T�y�r4r�c�0��eZdZdeedf�fd�	Zdd�Z�xZS)�_VersionActionNz&show program's version number and exitc�D��tt|�|||d|��||_yr�)rUr�r`�version)r+r�r�rr�r�rWs      �r2r`z_VersionAction.__init__#s.���	�n�d�,�)��g�Q�UY�	-�	
���r4c��|j}|�|j}|j�}|j|�|j|j	�t
j�|j�yr6)r��_get_formatterr��_print_messagerv�_sys�stdoutr�)r+rKrLrMr�r�rks       r2rNz_VersionAction.__call__0s[���,�,���?��n�n�G��)�)�+�	����7�#����i�3�3�5�t�{�{�C����
r4r6r�r\s@r2r�r�"s����
��
5�
�r4r�c�R��eZdZGd�de�Zedddf�fd�	Zd�Zd�Zd	d�Z	�xZ
S)
�_SubParsersActionc���eZdZ�fd�Z�xZS)�&_SubParsersAction._ChoicesPseudoActionc���|x}}|r|ddj|�zz
}ttj|�}|j	g|||��y)Nr�r!)r�rr�r�)r*rUr��_ChoicesPseudoActionr`)r+r0�aliasesr�r�r�suprWs       �r2r`z/_SubParsersAction._ChoicesPseudoAction.__init__<sO���!�!�G�d���7�T�Y�Y�w�%7�7�7���)�>�>��E�C��L�L���D�'�L�Rr4ror\s@r2r�r�;s���	S�	Sr4r�FNc	���||_||_i|_g|_tt
|�||t|j|||��y)N)r�rr�r�r�r�r�)�_prog_prefix�
_parser_class�_name_parser_map�_choices_actionsrUr�r`r)	r+r�r\�parser_classrr�r�r�rWs	        �r2r`z_SubParsersAction.__init__CsS��� ���)��� "��� "���
���/�)����)�)����	0�	
r4c��|jd��|j�d|��|d<|jdd�}||jvrt	|td�|z��|D](}||jvs�t	|td�|z��d|vr?|jd�}|j
|||�}|jj|�|jdi|��}||j|<|D]}||j|<�|S)Nr\r�r�r<zconflicting subparser: %szconflicting subparser alias: %sr�)
r�r�r�r�rr�r�r�r&r�)r+r0�kwargsr��aliasr��
choice_actionrKs        r2�
add_parserz_SubParsersAction.add_parserSs"���:�:�f��%�(,�(9�(9�4�@�F�6�N��*�*�Y��+���4�(�(�(���a�(C�&D�t�&K�L�L��	X�E���-�-�-�#�D�!�,M�*N�QV�*V�W�W�	X�
�V���:�:�f�%�D� �5�5�d�G�T�J�M��!�!�(�(��7�$��#�#�-�f�-��&,����d�#��	2�E�+1�D�!�!�%�(�	2��
r4c��|jSr6)r�r:s r2rz!_SubParsersAction._get_subactionsps���$�$�$r4c��|d}|dd}|jturt||j|�	|j|}|j|d�\}	}t|	�j�D]\}
}t||
|��|r?t|�jtg�t|t�j|�yy#t$r9|dj|j�d�}t
d�|z}t||��wxYw)Nrrcr!)�parser_namer�z5unknown parser %(parser_name)r (choices: %(choices)s))rrrYr��KeyErrorr*r�r�parse_known_argsrr9�
setdefault�_UNRECOGNIZED_ARGS_ATTRrCr�)r+rKrLrMr�r�r-rs�msg�subnamespace�keyr1s            r2rNz_SubParsersAction.__call__ss���Q�i���Q�R�j���9�9�H�$��I�t�y�y�+�6�	+��*�*�;�7�F�%+�$;�$;�K��$N�!��k��|�,�2�2�4�	+�J�C���I�s�E�*�	+����O�&�&�'>��C��I�6�7�>�>�{�K���!�	+�#.�4�9�9�T�EZ�EZ�;[�\�D��K�L�t�S�C���c�*�*�	+�s�C	�	ADr6)r$r=r>r
r�rr`r�rrNr[r\s@r2r�r�:s6���S�v�S�AI�SX�_c�mq�
� �:%�Lr4r�c��eZdZdd�Zy)�
_ExtendActionNc��t||jd�}t|�}|j|�t	||j|�yr6)rCrrCr�rYrxs      r2rNz_ExtendAction.__call__�ryr4r6)r$r=r>rNr<r4r2r�r��s��-r4r�c�$�eZdZdZdd�Zd�Zd�Zy)ra�Factory 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+�mode�bufsize�encoding�errorss     r2r`zFileType.__init__�s����
���
�!�����r4c�F��|dk(r�d�jvr8d�jvrtjjStjSt	�fd�dD��r8d�jvrtj
jStj
St
d��jz}t|��	t|�j�j�j�j�S#t$r#}||d�}t
d�}t||z��d}~wwxYw)	N�-�r�bc3�:�K�|]}|�jv���y�wr6)r�)r"r	r+s  �r2r#z$FileType.__call__.<locals>.<genexpr>�s�����4��Q�$�*�*�_�4�s��waxzargument "-" with mode %r)�filename�errorz$can't open '%(filename)s': %(error)s)r�r��stdin�buffer�anyr�r�r�r�r�r�r��OSErrorr)r+�stringr��ersr9s`     r2rNzFileType.__call__�s�����S�=��d�j�j� �,/�4�:�:�,=�t�z�z�(�(�M�4�:�:�M��4�e�4�4�-0�D�J�J�->�t�{�{�)�)�O�D�K�K�O��3�4�t�z�z�A�� ��o�%�	4����
�
�D�M�M�4�>�>�4�<�<�X�X���	4� &��3�D��>�?�G�#�G�d�N�3�3��	4�s�=6C4�4	D �=D�D c
�N�|j|jf}d|jfd|jfg}dj	|D�cgc]}|dk7s�	t|���c}|D��cgc]\}}|��	|�d|����c}}z�}t
|�j�d|�d�Scc}wcc}}w)Nr�r�r!r�rr r")r�r�r�r�r*r'r#r$)r+rsr�r/�kw�args_strs      r2r3zFileType.__repr__�s����z�z�4�=�=�(���t�~�~�.��4�<�<�0H�I���9�9�"&�4�3�#��)�T�#�Y�4�[a�7u�PW�PR�TW�eh�et�2�s�8K�7u�u�
�� ��:�.�.��9�9��
5��7us�
B�
B�#
B!�.	B!)r�r�NN)r$r=r>r?r`rNr3r<r4r2rr�s��� �4�&:r4rc�"�eZdZdZd�Zd�Zd�Zy)rz�Simple object for storing attributes.

    Implements equality by attribute names and values, and provides a simple
    string representation.
    c�2�|D]}t||||��yr6)rY)r+r�r0s   r2r`zNamespace.__init__�s!���	.�D��D�$��t��-�	.r4c�\�t|t�stSt|�t|�k(Sr6)r�r�NotImplementedr)r+�others  r2�__eq__zNamespace.__eq__�s%���%��+�!�!��D�z�T�%�[�(�(r4c��||jvSr6)r8)r+r�s  r2�__contains__zNamespace.__contains__�s���d�m�m�#�#r4N)r$r=r>r?r`r�r�r<r4r2rr�s���.�)�
$r4rc���eZdZ�fd�Zd�Zdd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zdd�Zd�Zd�Zd�Zd�Z�xZS)�_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)Nr��store�store_const�
store_true�store_falser&�append_constr�r�r��parsersr�z^-\d+$|^-\d*\.\d+$)rUr�r`�description�argument_default�prefix_chars�conflict_handler�_registries�registerr^rerkrrrur{rr�r�r�r��_get_handler�_actions�_option_string_actions�_action_groups�_mutually_exclusive_groups�	_defaultsrWrX�_negative_number_matcher�_has_negative_number_optionals)r+r�r�r�r�rWs     �r2r`z_ActionsContainer.__init__�sZ���
���/�1�&��� 0���(��� 0������	
�
�
�h��l�3��
�
�h���6��
�
�h�
�/@�A��
�
�h��.>�?��
�
�h�
�/@�A��
�
�h��-�8��
�
�h��0B�C��
�
�h���6��
�
�h���4��
�
�h�	�>�:��
�
�h�	�+<�=��
�
�h��-�8�	
������
�&(��#�!���*,��'����),���4I�(J��%�/1��+r4c�F�|jj|i�}|||<yr6)r�r�)r+�
registry_namer1r�registrys     r2r�z_ActionsContainer.registers#���#�#�.�.�}�b�A�� ���r4c�@�|j|j||�Sr6)r�r�)r+r�r1r�s    r2�
_registry_getz_ActionsContainer._registry_get"s �����
�.�2�2�5�'�B�Br4c��|jj|�|jD]%}|j|vs�||j|_�'yr6)r��updater�rr�)r+r�r�s   r2�set_defaultsz_ActionsContainer.set_defaults(sE�������f�%��m�m�	5�F��{�{�f�$�!'����!4���	5r4c��|jD],}|j|k(s�|j�� |jcS|jj	|d�Sr6)r�rr�r�r�)r+rr�s   r2�get_defaultz_ActionsContainer.get_default1sM���m�m�	&�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|�d���t|d�r!	|j�j|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 argumentr�Nzunknown action "�"r#z is not callablez: is a FileType class object, instance of it must be passedr�z,length of metavar tuple does not match nargsr<)r�r�r��_get_positional_kwargs�_get_optional_kwargsr�r��_pop_action_class�callabler�r#rrr�r�r�_add_action)r+rsr��charsr�action_classr��	type_funcs        r2r�z_ActionsContainer.add_argument:s����!�!���s�4�y�A�~�$�q�'�!�*�E�*A���&�(� �!N�O�O�0�T�0�0�$�A�&�A�F�/�T�.�.��?��?�F��F�"��&�>�D��t�~�~�%�$(�N�N�4�$8��y�!��&�&�2�$(�$9�$9��y�!��-�-�f�5����%��l�D�E�E��'��'���&�&�v�v�{�{�F�K�K�H�	��	�"��Y�@�A�A��� ��bk�m�n�n��4�)�*�
Q��#�#�%�2�2�6�4�@�����'�'���
Q� �!O�P�P�
Q�s�8 E)�)E>c�Z�t|g|��i|��}|jj|�|Sr6)�_ArgumentGroupr�r&)r+rsr�r�s    r2�add_argument_groupz$_ActionsContainer.add_argument_groupls/���t�5�d�5�f�5�����"�"�5�)��r4c�T�t|fi|��}|jj|�|Sr6)�_MutuallyExclusiveGroupr�r&)r+r�r�s   r2�add_mutually_exclusive_groupz._ActionsContainer.add_mutually_exclusive_groupqs*��'��7��7���'�'�.�.�u�5��r4c�V�|j|�|jj|�||_|jD]}||j
|<�|jD]F}|jj|�s�|jr�,|jjd��H|S)NT)	�_check_conflictr�r&�	containerr�r�r��matchr�)r+r�r�s   r2r�z_ActionsContainer._add_actionvs������V�$�	
�
�
���V�$����$�2�2�	@�M�9?�D�'�'�
�6�	@�$�2�2�	E�M��,�,�2�2�=�A��:�:��7�7�>�>�t�D�	E��
r4c�:�|jj|�yr6)r��removers  r2�_remove_actionz _ActionsContainer._remove_action�s���
�
���V�$r4c��i}|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)�titler�r�)r�)r�rr�r�rr�r�r�r�rr�r�r�r�)r+r�title_group_mapr�r��	group_mapr��mutex_groups        r2�_add_container_actionsz(_ActionsContainer._add_container_actions�sc�����(�(�	1�E��{�{�o�-��H�I�� �����!4�5�5�+0�O�E�K�K�(�		1��	��-�-�
	A�E��{�{�/�1�/3�/F�/F��+�+�5�3D�3D�W\�Wm�Wm�0G�0�����,�
 �.�.�
A��$3�E�K�K�$@�	�&�!�
A�
	A��9�9�	0�E��;�;�U�^�^�;�T�K� �.�.�
0��$/�	�&�!�
0�		0� �(�(�	<�F��M�M�&�$�'�3�3�F�;�	<r4c���d|vrtd�}t|��|jd�ttfvrd|d<|jd�tk(r	d|vrd|d<t||g��S)Nr�z1'required' is an invalid argument for positionalsr�Tr��rr�)r�rr�rrr�)r+rr�r�s    r2r�z(_ActionsContainer._get_positional_kwargs�st������G�H�C��C�.� ��:�:�g��x��&>�>�!%�F�:���:�:�g��,�.�9�F�3J�!%�F�:���F��b�9�9r4c��g}g}|D]~}|d|jvr(||jd�}td�}t||z��|j|�t	|�dkDs�\|d|jvs�n|j|���|jdd�}|�U|r|d}n|d}|j
|j�}|std�}t|z��|jdd�}t|||�	�S)
Nr)�optionr�zNinvalid option string %(option)r: must start with a character %(prefix_chars)rrcrz%dest= is required for options like %rr�r�r)	r�r�r�r&r�r��lstrip�replacer�)	r+rsr�r��long_option_stringsr�r�r�dest_option_strings	         r2r�z&_ActionsContainer._get_optional_kwargs�s���� ��!�
	:�M� ��#�t�'8�'8�8�"/��AR�AR�S���k�l�� ��t��,�,�
�!�!�-�0��=�!�A�%�-��*:�d�>O�>O�*O�#�*�*�=�9�
	:��z�z�&�$�'���<�"�%8��%;�"�%3�A�%6�"�%�,�,�T�->�->�?�D���?�@�� ��}�!4�5�5��<�<��S�)�D��F��n�E�Er4c�L�|jd|�}|jd||�S)Nr�)r�r�)r+r�r�r�s    r2r�z#_ActionsContainer._pop_action_class�s'�����H�g�.���!�!�(�F�F�;�;r4c��d|jz}	t||�S#t$r$td�}t	||jz��wxYw)Nz_handle_conflict_%sz%invalid conflict_resolution value: %r)r�rCr
r�r�)r+�handler_func_namer�s   r2r�z_ActionsContainer._get_handler�sV��1�D�4I�4I�I��	:��4�!2�3�3���	:��;�<�C��S�4�#8�#8�8�9�9�	:�s	��-A
c���g}|jD]3}||jvs�|j|}|j||f��5|r|j�}|||�yyr6)r�r�r&r�)r+r��confl_optionalsr��confl_optionalr�s      r2r
z!_ActionsContainer._check_conflict�sr����#�2�2�	H�M��� ;� ;�;�!%�!<�!<�]�!K���&�&�
�~�'F�G�	H��#�0�0�2���V�_�5�r4c��tddt|��}dj|D��cgc]\}}|��	c}}�}t||z��cc}}w)Nzconflicting option string: %szconflicting option strings: %sr!)rr�r*r)r+r��conflicting_actionsr9r��conflict_strings      r2�_handle_conflict_errorz(_ActionsContainer._handle_conflict_error�sP���:�<\�^a�bu�^v�w���)�)�Pc�$d�7L�}�f�]�$d�e���F�G�o�$=�>�>��%es�A

c���|D]d\}}|jj|�|jj|d�|jr�J|jj|��fyr6)r�rr�r�rr)r+r�r%r�s    r2�_handle_conflict_resolvez*_ActionsContainer._handle_conflict_resolves_��%8�	8�!�M�6��!�!�(�(��7��'�'�+�+�M�4�@��(�(�� � �/�/��7�	8r4r6)r$r=r>r`r�r�r�r�r�rrr�rrr�r�r�r�r
r'r)r[r\s@r2r�r��sc���,1�b!�C�5�.�0(�d�
�
�*%�#<�J:� F�@<�:�6�?�

8r4r�c�>��eZdZd�fd�	Z�fd�Z�fd�Z�fd�Z�xZS)rc���|j}|d|j�|d|j�|d|j�tt
|�}|dd|i|��||_g|_|j|_	|j|_
|j|_|j|_|j|_
|j|_y)Nr�r�r�r�r<)r�r�r�r�rUrr`rr�r�r�r�r�r�r�)r+rrr�r�r��
super_initrWs       �r2r`z_ArgumentGroup.__init__s�����"�"���!�9�#=�#=�>��~�y�5�5�6��!�9�#=�#=�>��>�4�9�
��5�{�5�f�5���
� ���%�0�0���!�*�*��
�&/�&F�&F��#�"�,�,���.7�.V�.V��+�*3�*N�*N��'r4c�d��tt|�|�}|jj	|�|Sr6)rUrr�r�r&�r+r�rWs  �r2r�z_ArgumentGroup._add_action%s-����~�t�8��@�����"�"�6�*��
r4c�b��tt|�|�|jj	|�yr6)rUrrr�rr.s  �r2rz_ArgumentGroup._remove_action*s&���
�n�d�2�6�:����"�"�6�*r4c�Z��tjdtd��t�|�|i|��S)Nz&Nesting argument groups is deprecated.rF��category�
stacklevel)�warnings�warn�DeprecationWarningrUr�r+rsr�rWs   �r2rz!_ArgumentGroup.add_argument_group.s+����
�
�>�I[�hi�j��w�)�4�:�6�:�:r4�NN)r$r=r>r`r�rrr[r\s@r2rrs���O�*�
+�;�;r4rc�6��eZdZd�fd�	Zd�Zd�Z�fd�Z�xZS)rc�H��tt|�|�||_||_yr6)rUrr`r��
_container)r+rr�rWs   �r2r`z _MutuallyExclusiveGroup.__init__4s!���
�%�t�5�i�@� ��
�#��r4c��|jrtd�}t|��|jj	|�}|j
j
|�|S)Nz-mutually exclusive arguments must be optional)r�r�r�r;r�r�r&)r+r�r�s   r2r�z#_MutuallyExclusiveGroup._add_action9sK���?�?��C�D�C��S�/�!����,�,�V�4�����"�"�6�*��
r4c�p�|jj|�|jj|�yr6)r;rr�rrs  r2rz&_MutuallyExclusiveGroup._remove_actionAs(�����&�&�v�.����"�"�6�*r4c�Z��tjdtd��t�|�|i|��S)Nz0Nesting mutually exclusive groups is deprecated.rFr1)r4r5r6rUrr7s   �r2rz4_MutuallyExclusiveGroup.add_mutually_exclusive_groupEs+����
�
�H�Se�rs�t��w�3�T�D�V�D�Dr4)F)r$r=r>r`r�rrr[r\s@r2rr3s���$�
�+�E�Er4rc
���eZdZdZddddgedddddddf
�fd�	Zd�Zd�Zd	�Zd
�Z	d�Z
d#d�Zd#d
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd#d�Zd#d�Zd�Zd�Zd�Zd�Zd�Zd�Zd$d�Zd$d�Zd$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
    Nr�r�Tc	����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$rY�JwxYw)
N)r�r�r�r�rzpositional arguments�optionsc��|Sr6r<)r�s r2�identityz)ArgumentParser.__init__.<locals>.identity�s���Mr4r#r��hrFr�zshow this help message and exit)r�r�r�)rUrr`�_os�path�basenamer��argvr\r��epilog�formatter_class�fromfile_prefix_chars�add_help�allow_abbrev�
exit_on_errorrr��_positionals�
_optionals�_subparsersr�r�rrr�r�r
)r+r\r�r�rI�parentsrJr�rKr�r�rLrMrN�	superinit�	add_grouprC�default_prefixrl�defaultsrWs                    �r2r`zArgumentParser.__init__`sz��� �.�$�8�	��#�%�-�-�		
��<��8�8�$�$�T�Y�Y�q�\�2�D���	���
����.���%:��"� ��
�(���*����+�+�	�%�a�(>�&?�@���#�A�i�L�1������	�	
�
�
�f�d�H�-�!$�|� 3���a����=�=������$���"�V�+�� ��8�9�
�
��	0�F��'�'��/�
0�!�+�+�����%�%�h�/�	0��"�
��
�s�5E�	E+�*E+c�L�gd�}|D�cgc]}|t||�f��c}Scc}w)N)r\r�r�rJr�rLrBrDs   r2r(zArgumentParser._get_kwargs�s+��
��9>�>���w�t�T�*�+�>�>��>rFc��|j�|jtd��|jdt	|��d|vsd|vrNt|jdd��}t|jdd��}|j
||�|_n|j|_|jd��k|j�}|j�}|j}|j|j||d�|j�j�|d<|j!|d�}|d
d	gi|��}|jj#|�|S)Nz(cannot have multiple subparser argumentsr�rr��subcommandsr\ror�r�r<)rQr�r�r�r#r�rrOr�r��_get_positional_actionsr�r�r�rvr�r�r�)	r+r�rr�rkr�r��
parsers_classr�s	         r2�add_subparserszArgumentParser.add_subparsers�s>�����'��J�J�q�C�D�E�	���.�$�t�*�5��f��
�� 7��f�j�j��-�8�9�E��F�J�J�}�d�;�<�K�#�6�6�u�k�J�D��#�0�0�D���:�:�f��%��+�+�-�I��6�6�8�K��4�4�F�����
�
�K���D�&�2�2�4�:�:�<�F�6�N��.�.�v�y�A�
��;�b�;�F�;�����$�$�V�,��
r4c��|jr|jj|�|S|jj|�|Sr6)r�rPr�rOrs  r2r�zArgumentParser._add_action�s?��� � ��O�O�'�'��/��
�
���)�)�&�1��
r4c�Z�|jD�cgc]}|js�|��c}Scc}wr6�r�r�rs  r2�_get_optional_actionsz$ArgumentParser._get_optional_actions�s"��%)�]�]�L�6�f�6K�6K��L�L��L��(�(c�Z�|jD�cgc]}|jr�|��c}Scc}wr6r_rs  r2rZz&ArgumentParser._get_positional_actions�s"��%)�]�]�P�6�&�:O�:O��P�P��Prac��|j||�\}}|r.td�}|j|dj|�z�|S�Nzunrecognized arguments: %sr�)r�r�r�r*�r+rsrLrHr�s     r2�
parse_argszArgumentParser.parse_args�sD���*�*�4��;�
��d���0�1�C��J�J�s�S�X�X�d�^�+�,��r4c��|�tjdd}nt|�}|�
t�}|jD]`}|j
tus�t||j
�r�-|jtus�@t||j
|j��b|jD])}t||�r�t|||j|��+|jr	|j||�\}}n|j||�\}}t|t �r/|j#t%|t ��t'|t �||fS#t$r$}|jt|��Yd}~�kd}~wwxYwrb)r�rHr7rr�rrrr�rYr�rN�_parse_known_argsrr�r�r�r�rC�delattr)r+rsrLr�r�errs      r2r�zArgumentParser.parse_known_args�sL���<��9�9�Q�R�=�D���:�D���!��I��m�m�	H�F��{�{�(�*��y�&�+�+�6��~�~�X�5��	�6�;�;����G�		H��N�N�	?�D��9�d�+��	�4�����)=�>�	?�
���
%�"&�"8�"8��y�"I��	�4�#�4�4�T�9�E�O�I�t��9�5�6��K�K��	�+B�C�D��I�6�7��$����!�
%��
�
�3�s�8�$�$��
%�s�"E�	E=�E8�8E=c	�\��������� �!�"��j��j���i��jD]h}|j}t	|j�D]B\}}�j|g�}|j
|d|�|j
||dzd��D�ji�g}t��}	t	|	�D]b\}}
|
dk(r*|jd�|	D]}
|jd���5�j|
�}|�d}n|�|<d}|j|��ddj|��t�� t��!d��� �!�fd�	�"������"fd�}
�j�������"fd	�}g�d
}�rt��}nd}||kr`t�D�cgc]
}||k\s�	|��c}�}||k7r||�}||kDr|}�9|}|�vr�||}�j
|�|}|
|�}||kr�`||�}�j
�|d�g}�jD]�}|� vs�|j r|jt#|���/|j$��<t'|j$t(�s�Wt+�|j,�s�n|j$t/�|j,�us��t1�|j,�j3||j$����|r,�j5t7d�d
j|�z��jD]�}|j s�|jD]}|�!vs��&|jD�cgc] }|j8t:us�t#|���"}}t7d�}�j5|dj|�z�����fScc}wcc}w)NrcrRr��A�Oroc�2���	j|��j||�}||jurQ�
j|��j|g�D]+}|�
vs�t	d�}t|�}t
|||z��|tur|��||�yy)Nznot allowed with argument %s)r��_get_valuesr�r�r�r5rr)r��argument_stringsr��argument_values�conflict_actionr��action_name�action_conflictsrL�seen_actions�seen_non_default_actionsr+s       �����r2�take_actionz5ArgumentParser._parse_known_args.<locals>.take_actionAs�������V�$�"�.�.�v�7G�H�O�
�f�n�n�4�(�,�,�V�4�'7�';�';�F�B�'G�G�O�&�*B�B�� >�?��&6��&G��+�F�C�+�4E�F�F�	G��h�.��t�Y���G�/r4c����|}|\}}}�j}g}	|��j�|�|dzS|��||d�}�j}|dk(rh|d|vra|dk7r\|j|g|f�|d}	|	|dz}|ddxsd}
�j}||vr||}|
}n�t	d�}t|||z��|dk(r|dz}
|g}|j|||f�nNt	d�}t|||z��|dz}�|d}|||�}||z}
�||
}|j|||f�n��|sJ�|D]\}}}�|||��|
S)Nrcrlrrozignored explicit argument %r)�_match_argumentr&r�r�r�r)�start_index�option_tupler�r��explicit_arg�match_argument�
action_tuples�	arg_countr�char�new_explicit_arg�
optionals_mapr��stoprsr��selected_patternsr-�arg_strings_pattern�extras�option_string_indicesr+rws                 ������r2�consume_optionalz:ArgumentParser._parse_known_args.<locals>.consume_optionalVs����0��=�L�2>�/�F�M�<�"�1�1�N��M���>��M�M�+�k�":�;�&��?�*� �+� .�v�s� ;�I�
!�-�-�E� �A�~�-��*:�%�*G�L�\^�L^�%�,�,�f�b�-�-H�I�,�Q�/��(,�|�A��(>�
�+7���+;�+C�t�(�(,�(C�(C�
�(�M�9�%2�=�%A�F�+;�L�"#�$B�"C�C�"/���l�8J�"K�K�#�a��*�Q��� ,�~��%�,�,�f�d�M�-J�K��
 � >�?��+�F�C�,�4F�G�G�(�!�O�E�(;�E�F�(C�%� .�v�7H� I�I� �9�,�D�&�u�T�2�D�!�(�(�&�$�
�)F�G��i�p!� �=�/<�
9�+���m��F�D�-�8�
9��Kr4c����
j}�|d}|�	|�}t�	|�D]\}}�|||z}||z
}�||���	t|�d�	dd|Sr6)�_match_arguments_partial�zipr�)rz�
match_partial�selected_pattern�
arg_countsr�rrsr-r�r�r+rws       �����r2�consume_positionalsz=ArgumentParser._parse_known_args.<locals>.consume_positionals�s���� �9�9�M�2�;�<�@��&�{�4D�E�J�&)��j�%A�
*�!��	�"�;��y�1H�I���y�(���F�D�)�
*�)��Z��):�;�K��N��r4rr�z(the following arguments are required: %sr!z#one of the arguments %s is requiredr�r6)rK�_read_args_from_filesr�r�r�r�r��iterr&�_parse_optionalr*r�rZrNrMr�r�r5r�r�r�rrrCrY�
_get_valuer�r�r�r)#r+r-rLrr�r��mutex_action�	conflicts�arg_string_pattern_parts�arg_strings_iter�
arg_stringr{�patternr�r�rz�max_option_string_indexr��next_option_string_index�positionals_end_index�strings�
stop_index�required_actionsr�r�rEr�rtr�r�r�r�rurvrws#```                        @@@@@@@@r2rhz ArgumentParser._parse_known_argss������%�%�1��4�4�[�A�K����:�:�	9�K�'�6�6�M�#,�[�-G�-G�#H�
9���<�,�7�7��b�I�	�� � ��r��!2�3�� � ��q�1�u�w�!7�8�
9�	9�!#��#%� ���,��&�'7�8�	9�M�A�z��T�!�(�/�/��4�"2�9�J�,�3�3�C�8�9� $�3�3�J�?���'�!�G�/;�)�!�,�!�G�(�/�/��8�!	9�&!�g�g�&>�?���u��#&�5� �	H�	H�*D	�D	�P�2�2�4��	�	�(���� �&)�*?�&@�#�&(�#��4�4�'*�?T�+m�e�X]�al�Xl�E�+m�'n�$��6�6�(;�K�(H�%�)�;�6�"7�K��"7�K��"7�7�%�k�2J�K���
�
�g�&�6��+�;�7�K�-�4�4�2)��5�
�	�
�
�k�*�+�.�/����m�m�	a�F��\�)��?�?�$�+�+�,<�V�,D�E����2�&�v�~�~�s�;�#�I�v�{�{�;�"�N�N�g�i����.M�M��	�6�;�;�����PV�P^�P^�8_�`�	a�"��J�J�q�C�D�t�y�y�Qa�Gb�b�c��4�4�
	6�E��~�~�#�2�2�6�F��!9�9��6�EJ�DX�DX�x�&�\b�\g�\g�ow�\w�-�f�5�x�E�x��A�B�C��J�J�s�S�X�X�e�_�4�5�
	6��&� � ��C,n��xys�
N$� N$�	N)�!
N)c���g}|D]�}|r|d|jvr|j|��(	t|dd�5}g}|j�j	�D])}|j|�D]}|j|���+|j
|�}|j|�ddd���|S#1swY�
xYw#t$r$}|jt|��Yd}~��d}~wwxYwr�)rKr&r��readr%�convert_arg_line_to_argsr�r�r�r�r�)r+r-�new_arg_stringsr��	args_file�arg_liner/rjs        r2r�z$ArgumentParser._read_args_from_filess�����%�	)�J���A��d�6P�6P�!P��&�&�z�2�	)��j���n�-�<��&(��(1���(8�(C�(C�(E�8�H�'+�'D�'D�X�'N�8�� +� 2� 2�3� 7�8�8�'+�&@�&@��&M��'�.�.�{�;�
<��	)�&��<�<���)��J�J�s�3�x�(�(��)�s/�C�A/B7�+C�7C	�<C�	C0�C+�+C0c��|gSr6r<)r+r�s  r2r�z'ArgumentParser.convert_arg_line_to_argss
���z�r4c�x�|j|�}tj||�}|�xdtd�ttd�t
td�i}|j
|j�}|�$tdd|j�|jz}t||��t|jd��S)Nzexpected one argumentzexpected at most one argumentzexpected at least one argumentzexpected %s argumentzexpected %s argumentsrc)�_get_nargs_patternrWrr�rrr�r�rrr�r�)r+r�r��
nargs_patternr�nargs_errorsr�s       r2ryzArgumentParser._match_arguments����/�/��7�
��	�	�-�)<�=���=��a�/�0��!�;�<��Q�?�@��L�
�"�"�6�<�<�0�C��{��5�7N�PV�P\�P\�]�`f�`l�`l�l�����,�,��5�;�;�q�>�"�"r4c	�\�g}tt|�dd�D]�}|d|}dj|D�cgc]}|j|���c}�}t	j
||�}|��O|j
|j�D�	cgc]
}	t|	���c}	�|S|Scc}wcc}	w)Nrr�ro)r�r�r*r�rWrr�r�)
r+r�r�r�r��
actions_slicer�r�rr�s
          r2r�z'ArgumentParser._match_arguments_partial/s������s�7�|�Q��+�	�A�#�B�Q�K�M��g�g�]�[�6�t�6�6�v�>�[�\�G��I�I�g�':�;�E�� ��
�
�����H�v�s�6�{�H�I���
�	��
��\��Is�B$
�B)
c
�t�|sy|d|jvry||jvr|j|}||dfSt|�dk(ryd|vr7|jdd�\}}||jvr|j|}|||fS|j	|�}t|�dkDrLdj|D���cgc]\}}}|��
c}}}�}||d�}t
d�}|j||z�nt|�dk(r|\}	|	S|jj|�r
|jsyd|vryd|dfScc}}}w)Nrrcrr!)r�matchesz4ambiguous option: %(option)s could match %(matches)sr�)r�r�r��split�_get_option_tuplesr*r�r�r�rr�)
r+r�r�r�r|�
option_tuplesrArsr�r{s
          r2r�zArgumentParser._parse_optional>ss�����!�}�� 1� 1�1����4�4�4��0�0��<�F��:�t�+�+��z�?�a����*��*4�*:�*:�3��*B�'�M�<��� ;� ;�;��4�4�]�C���}�l�:�:��/�/�
�;�
��}���!��i�i�Zg� h� h�3V�6�=�,�� h�i�G�(�W�=�D��J�K�C��J�J�s�T�z�"���
�1�
$�+�O�\���
�(�(�.�.�z�:��6�6���*����Z��%�%��1!is�2
D3c��g}|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)r�rMr�r�rTr&r�r�)
r+r�r�r�
option_prefixr|r�r��short_option_prefix�short_explicit_args
          r2r�z!ArgumentParser._get_option_tuplesws������!�!�����u�$��q�)9�U�)B�� � ��-�'�2?�2E�2E�c�1�2M�/�M�<�$1�M�#'�L�%)�%@�%@�+�M�$�/�/�
�>�!%�!<�!<�]�!K��$�m�\�A���
�
�c�*�	+�<�
�+�1�
��
&�=��+;�5�+H�)�M��L�"/���"3��!.�q�r�!2��!%�!<�!<�
'�
� �$7�7�!�8�8��G�F� �-�1C�C�C��M�M�#�&�"�-�-�m�<�!�8�8��G�F� �-��=�C��M�M�#�&�
'��
�
�J�J�q�7�8�=�H�I��
r4c�F�|j}|�d}n_|tk(rd}nS|tk(rd}nG|tk(rd}n;|tk(rd}n/|t
k(rd}n#|tk(rd}ndd	jd
|z�z}|jr$|jd	d�}|jdd�}|S)
Nz(-*A-*)z(-*A?-*)z	(-*[A-]*)z
(-*A[A-]*)z([-AO]*)z(-*A[-AO]*)z(-*-*)z(-*%s-*)z-*rlror�)
r�rrrrrrr*r�r)r+r�r�r�s    r2r�z!ArgumentParser._get_nargs_pattern�s��������=�%�M��h�
�&�M��l�
"�'�M��k�
!�(�M��i�
�&�M��f�_�)�M��h�
�$�M�'����3��;�)?�?�M�� � �)�1�1�$��;�M�)�1�1�#�r�:�M��r4c��|j||�\}}|r.td�}|j|dj|�z�|Srd)�parse_known_intermixed_argsr�r�r*res     r2�parse_intermixed_argsz$ArgumentParser.parse_intermixed_args�sD���5�5�d�I�F�
��d���0�1�C��J�J�s�S�X�X�d�^�+�,��r4c���|j�}|D�cgc]}|jttfvs�|��}}|rt	d|djz��|j
D��cgc]#}|jD]}||vr|j���%c}}rt	d��	|j}	|j�|j�dd|_|D]:}|j|_
t|_|j|_
t|_�<|j||�\}}|D]g}t||j�s�t!||j�gk(s�4ddlm}	|	d|j�d|���t'||j��i	|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�)r5zDo not expect z in F)rZr�rrrr�r�rr�r��
save_nargsrr��save_defaultr�rrCr4r5rir`r��
save_required)r+rsrLr�r��ar��
save_usage�remaining_argsr5r�r�s            r2r�z*ArgumentParser.parse_known_intermixed_args�s����2�2�4��"-�U�����&�)�AT�1T�V�U��U���T�WX�YZ�W[�Wa�Wa�a�b�b��8�8�
���.�.�
����$�
�K�K�
��
��\�]�]�,	$����J�
9��:�:�%�!%�!2�!2�!4�Q�R�!8�D�J�)�.�F�(.���F�%�#+�F�L�*0�.�.�F�'�%-�F�N�
.�-1�,A�,A�$�	�,R�)�	�>�)�8�F��y�&�+�+�6�7�9�f�k�k�;Z�^`�;`�1�����i�P�Q��	�6�;�;�7�
8�*�9�F�#)�#4�#4�F�L�%+�%8�%8�F�N�9��2�2�4�I�
9�(�,�F�+1�?�?�F�(�&+�F�O�,�"�<�<�+�E�*/�.�.�E�'�%*�E�N�+�%)�$9�$9�.�)�$T�!�	�6�(�;�F�&,�&:�&:�F�O�;�!�<�<�9�E�%*�%8�%8�E�N�9�$�D�J��&� � ��s
V��
��>*�9�F�#)�#4�#4�F�L�%+�%8�%8�F�N�9�� (�;�F�&,�&:�&:�F�O�;�!�<�<�9�E�%*�%8�%8�E�N�9��$�D�J�sZ�I-�I-�%(I2�K%�*BI8�>I8�6I8�:K%�
AJ&�':K%�8+J#�#K%�&<K"�"K%�%	K.c�P�|jttfvr	|jd�|sn|jt
k(r[|jr
|j}n|j}t|t�r$|j||�}|j||�|S|sN|jtk(r;|js/|j�
|j}n|}|j||�|St|�dk(r>|jdt
fvr*|\}|j||�}|j||�|S|jtk(r!|D�cgc]}|j||���}}|S|jtk(r6|D�cgc]}|j||���}}|j||d�|S|jtk(rt}|S|D�cgc]}|j||���}}|D]}|j||��|S#t$rY���wxYwcc}wcc}wcc}w)NrRrcr)r�rrrr�rr�r@r�r�r�r��_check_valuerr�r)r+r�r-r1r��vs      r2rozArgumentParser._get_values(	s���<�<��	�2�2�
��"�"�4�(�
�v�|�|�x�7��$�$����������%��%������6���!�!�&�%�0�J��C�����!=�f�F[�F[��~�~�)�����#�����f�e�,�8��3��
��
"�v�|�|��h�7G�'G�'�M�Z��O�O�F�J�7�E����f�e�,�,��'�\�\�Y�
&�9D�E�A�T�_�_�V�Q�/�E�E�E�$���\�\�V�
#�9D�E�A�T�_�_�V�Q�/�E�E�E����f�e�A�h�/����\�\�X�
%��E���:E�E�A�T�_�_�V�Q�/�E�E�E��
-���!�!�&�!�,�
-����a�
��
��<F��F��Fs#�H	�H�H�H#�		H�Hc��|jd|j|j�}t|�std�}t	|||z��	||�}|S#t
$rF}t
|jdt|j��}t|�}t	||��d}~wttf$rJt
|jdt|j��}||d�}td�}t	|||z��wxYw)Nr#z%r is not callabler$)r#r1z!invalid %(type)s value: %(value)r)r�r#r�r�rrrCr'r�rr�)	r+r�r�rr�r�rjr0rss	         r2r�zArgumentParser._get_value_	s����&�&�v�v�{�{�F�K�K�H�	��	�"��(�)�C����i��8�8�	4��z�*�F� �
��!�	-��6�;�;�
�D����4E�F�D��c�(�C����,�,���:�&�	4��6�;�;�
�D����4E�F�D� �:�6�D��7�8�C����d�
�3�3�		4�s�A�	C>�!AB"�"AC>c���|j�U||jvrF|djtt|j��d�}t	d�}t|||z��yy)Nr!)r1r�z3invalid choice: %(value)r (choose from %(choices)s))r�r*r�r'r�r)r+r�r1rsr�s     r2r�zArgumentParser._check_valuey	sZ���>�>�%�%�v�~�~�*E�"�t�y�y��T�6�>�>�9R�/S�T�D��I�J�C����d�
�3�3�+F�%r4c��|j�}|j|j|j|j�|j�Sr6)r�r�r�r�r�rv)r+rks  r2r�zArgumentParser.format_usage�	s?���'�'�)�	����D�J�J��
�
�t�7V�7V�W��$�$�&�&r4c���|j�}|j|j|j|j�|j|j�|jD]c}|j|j�|j|j�|j|j�|j��e|j|j�|j�Sr6)r�r�r�r�r�r�r�r�r{rr�r�r}rIrv)r+rk�action_groups   r2rvzArgumentParser.format_help�	s����'�'�)�	�	���D�J�J��
�
�t�7V�7V�W�	���4�+�+�,�!�/�/�	$�L��#�#�L�$6�$6�7����|�7�7�8��#�#�L�$?�$?�@��!�!�#�		$�	���4�;�;�'��$�$�&�&r4c�:�|j|j��S)Nr�)rJr\r:s r2r�zArgumentParser._get_formatter�	s���#�#����#�3�3r4c�h�|�tj}|j|j�|�yr6)r�r�r�r��r+�files  r2�print_usagezArgumentParser.print_usage�	s)���<��;�;�D����D�-�-�/��6r4c�h�|�tj}|j|j�|�yr6)r�r�r�rvr�s  r2r�zArgumentParser.print_help�	s)���<��;�;�D����D�,�,�.��5r4c��|r'|xstj}	|j|�yy#ttf$rYywxYwr6)r��stderr�writer
r�)r+r9r�s   r2r�zArgumentParser._print_message�	sB����&�4�;�;�D�
��
�
�7�#���#�G�,�
��
�s�+�=�=c�r�|r |j|tj�tj|�yr6)r�r�r�r�)r+�statusr9s   r2r�zArgumentParser.exit�	s%����������5��	�	�&�r4c��|jtj�|j|d�}|j	dtd�|z�y)z�error(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\r9rFz%(prog)s: error: %(message)s
N)r�r�r�r\r�r�)r+r9rss   r2r�zArgumentParser.error�	s=��	
������%��	�	�g�6���	�	�!�Q�7�8�4�?�@r4r8r6)rN)#r$r=r>r?rr`r(r\r�r`rZrfr�rhr�r�ryr�r�r�r�r�r�ror�r�r�rvr�r�r�r�r�r�r[r\s@r2rrJs�����.�����%��"�� ����D0�R	?��>�M�Q��$�Lk!�Z�0�#�(
�7&�r+�Z+�b�G!�X5�n�44�'�
'�,4�7�
6�
��
Ar4r)3r?�__version__�__all__�osrE�rerW�sysr�r4rr�rrrrrrrr�rrrCrr	r
rrr5�	Exceptionrrr
rr^rerkrrrur{rr�r�r�r�rrr�rrrr<r4r2�<module>r�s���;�z����,����*���������	���	�.���v��>
�$s�F�s�lQ�-�Q�!�6�!��M��8$�}�$�(�U�I�U�&	�	�	�^@�
�^@�B/�F�/�@$.�6�$.�N
2��
2� 
�(�
�
�)�
�'-�F�'-�T-��-�(
1�6�
1��&���V��0VL��VL�r-�M�-�0:�v�0:�p$� �$�(`8��`8�F	!;�&�!;�HE�n�E�.
A�%�'8�
Ar4

Zerion Mini Shell 1.0