Hacked By AnonymousFox

Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/argparse.cpython-312.opt-1.pyc

�

6�fx�����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 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�Z0Gd?�d@e0�Z1GdA�dBe1�Z2GdC�dDee0�Z3y)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       �//opt/alt/python312/lib64/python3.12/argparse.py�__repr__z_AttributeHolder.__repr__vs�����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<r4r2rrms���
>�+�r4rc�`�|�gSt|�tur|ddSddl}|j|�S�Nr)r#r7�copy)r9rBs  r2�_copy_itemsrC�s5���}��	��E�{�d���Q�x����9�9�U��r4c���eZdZdZ			dd�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�&)�%�"�*�6F��6J�&K�#M������ ������"#���!�]�]�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�l�|xj|jzc_|xjdzc_yrbrdr:s r2�_dedentzHelpFormatter._dedent�s'������ 6� 6�6�����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turM|j�A|jj}td�t|j��z}d|d|fz}nd}|d||dg�Scc}}w)N�z%(heading)s:)rm�%*s%s
�
)rlrkre�_join_partsr9rgrmrrQ�_�dict)r+r*�func�args�	item_help�current_indent�heading_textrms        r2�format_helpz"HelpFormatter._Section.format_help�s����{�{�&����&�&�(��>�>�-�-�D��D�J�J�G�j�d�D�d�D�k�G�H�I��{�{�&����&�&�(����|�|�8�+����0H�!%���!?�!?�� ��0�4����3M�M��#�~�r�<�&H�H������w�	�4�8�9�9��#Hs�C;
r6)r$r=r>r`rzr<r4r2rTri�s��	�	:r4rTc�R�|jjj||f�yr6)rVr9r&)r+rurvs   r2�	_add_itemzHelpFormatter._add_item�s �����#�#�*�*�D�$�<�8r4c��|j�|j||j|�}|j|jg�||_yr6)rerTrVr|rz)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)rr|�_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)rr|�
_format_usage)r+�usage�actions�groups�prefixrvs      r2�	add_usagezHelpFormatter.add_usages1���� ��'�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�lenrQrSr|�_format_action)r+�action�get_invocation�invocations�	subaction�invocation_length�
action_lengths       r2�add_argumentzHelpFormatter.add_arguments����;�;�h�&�"�;�;�N�)�&�1�2�K�!�;�;�F�C�	��"�"�>�)�#<�=�D�!$�C��[�$9� :��-��0D�0D�D�M�&)�$�*A�*A�*7�'9�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�

rq)rUrzr[�sub�strip)r+r�s  r2rzzHelpFormatter.format_helpsI���!�!�-�-�/����+�+�/�/���=�D��:�:�d�#�d�*�D��r4c�^�dj|D�cgc]}|r
|tur|��c}�Scc}w)Nro)r*r)r+�part_strings�parts   r2rrzHelpFormatter._join_parts%s8���w�w�$0�:� ��D��$8��:�;�	;��:s�*c���|�td�}|�|t|j��z}�n|�|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�r1d}|	||�}
|	||�}tj||
�}tj||�}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|�}|�t|�dz
}n|dz
}|D]d}|dzt|�z�kDr,|r*|j|dj|�z�g}|dz
}|j|�|t|�dzz
}�f|r#|j|dj|�z�|�|d|d|d<|S)Nrcr�r)r�r&r*)	�parts�indentr��lines�line�
indent_length�line_lenr��
text_widths	        �r2�	get_linesz.HelpFormatter._format_usage.<locals>.get_linesZs�����E��D�$'��K�M��)�#&�v�;��?��#0�1�#4�� %��#�a�<�#�d�)�3�j�@�T�!�L�L��#�(�(�4�.�)@�A�#%�D�'4�q�'8�H����D�)� �C��I��M�1��
!&�����V�c�h�h�t�n�%<�=��)�#(��8�M�N�#;��a�� �Lr4g�?rcrqr�r6)
rsrtrK�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���
#�9�f�5�	�"�;��7�	��K�K��Y�?�	��K�K��Y�?�	�
!�,�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�+�+��GDs�
I	�I	c���t�}i}|D�]4}|jstd|����	|j|jd�}t	|j�}||z}||||jk(s�jd}	|jD]+}
|j|
�|
jtus�'|	dz
}	�-||	z
}|s��|js/||vr||xxdz
cc<nd||<||vr||xxdz
cc<n9d||<n3|dkDr.||vr||xxdz
cc<nd||<||vr||xxd	z
cc<nd	||<t|dz|�D]}d
||<�	��7g}
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��MwxYwcc}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�#7�
-?�AY�,Y�)�0� � �>�>� �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��%(���
�3�S�Z��"�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�"�[,�`���.�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�|�����O�
��
��xEs�M�M �M �	M�Mc���d|vr|t|j��z}t|j|jz
d�}d|jz}|j|||�dzS)Nz%(prog)r��r�r�)rtrKrNrPrQ�
_fill_text)r+r�r�r�s    r2r�zHelpFormatter._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�rorpz	%*s%-*s  rrcrq)rMrSrOrNrPrQr�r�r�r��_expand_help�_split_linesr&�endswithr�r�rr)
r+r��
help_position�
help_width�action_width�
action_header�tup�indent_firstr��	help_text�
help_linesr�r�s
             r2r�zHelpFormatter._format_actions����D�3�3�a�7� �3�3�5�
�����}�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�D��L�L��m�R��-F�!F�G�+��'�'��-��L�L����7�7��?�I��L�L��,�,�Y�7�8�@�����&�&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_invocation5s����$�$��>�>�v�F�G�?�t�.�.�v�w�?��B�H�G��N��E��|�|�q� ����V�2�2�3�
�@�@��H��"�/�/���@��%+�%:�%:�M��L�L�M�;�!G�H�&;��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>.formatVs����&�%�(��
��z�J�.�.r4)r��choices�strr*)r+r��default_metavar�choice�choice_strsr�r�s      @r2r�z HelpFormatter._metavar_formatterMse����>�>�%��^�^�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�rs�formatss        r2r�zHelpFormatter._format_args]s����-�-�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!)rt�varsrKr7r�hasattrr$r�r*r��_get_help_string)r+r��paramsr0�c�choices_strs      r2r�zHelpFormatter._expand_helpys����d�6�l����4����L�D��d�|�x�'��4�L�!���L�D��v�d�|�Z�0�%�d�|�4�4��t��!��:�:�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_subactions�sN����	�#�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�sF���'�'�+�+�C��6�<�<�>����}�}�T�5�,2�/5��7�	7r4c��|jSr6)r��r+r�s  r2r
zHelpFormatter._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�objectrTr|rr�r�r�r�r�rzrrr�r�r�r�r�r�r�r�r�r�r�r
r�r�r<r4r2rr�s����#$�#%��	;�>��
:�6�:�@9�(��6�5�
:�$&��;�
_,�Bq�fB�.'�`$�0� �86��*�7��#�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|vrF|jtur4ttg}|j
s|j|vr|td�z
}|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�rs)r+r�r��defaulting_nargss    r2r
z.ArgumentDefaultsHelpFormatter._get_help_string�s`���{�{���<��D��t�#��~�~�X�-�$,�l�#;� ��(�(�F�L�L�<L�,L��A�7�8�8�D��r4N)r$r=r>r?r
r<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�.�|jjSr6r0rs  r2r�z<MetavarTypeHelpFormatter._get_default_metavar_for_positional�r1r4N)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_namer8�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)r8�
argument_name�message)r+r7r<s   r2r`zArgumentError.__init__s��-�h�7�����r4c�~�|j�d}ntd�}|t|j|j��zS)Nz%(message)sz'argument %(argument_name)s: %(message)s)r<r;)r;rsrtr<)r+r�s  r2�__str__zArgumentError.__str__sA�����%�"�F��@�A�F���T�\�\�+/�+=�+=�?�?�	?r4N)r$r=r>r?r`r>r<r4r2rr�s����?r4rc��eZdZdZy)rz@An error from trying to convert a command line string to a type.N)r$r=r>r?r<r4r2rrs��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�rCr�r#r�r�r�r�s           r2r`zAction.__init__MsK��-�����	���
���
������	���� ��
���	���r4c�L�gd�}|D�cgc]}|t||�f��c}Scc}w)NrB��getattr�r+�namesr0s   r2r(zAction._get_kwargscs+��
��9>�>���w�t�T�*�+�>�>��>��!c� �|jdSrA)r�r:s r2r�zAction.format_usagers���"�"�1�%�%r4c�*�ttd���)Nz.__call__() not defined)�NotImplementedErrorrs�r+�parser�	namespace�valuesr�s     r2�__call__zAction.__call__us��!�!�$=�">�?�?r4�NNNNNFNNr6)r$r=r>r?r`r(r�rQr<r4r2r
r
s7��0�j���������,
?�&�@r4r
c�:��eZdZdeeddef�fd�	Zdd�Zd�Z�xZS)rNFc	�b��g}	|D]>}
|	j|
�|
jd�s�&d|
ddz}
|	j|
��@dD].}t�|tus�t	j
|dd���0|turd}|turd}|turd}t�|�|	|d||||||�	�	y)
N�--�--no-rF)r#r�r�zP{name!r} is deprecated as of Python 3.12 and will be removed in Python {remove}.)��)�remover)	r�rr�r�r#r�r�r�r�)r&�
startswith�locals�_deprecated_default�warnings�_deprecated�superr`)
r+r�rr�r#r�r�r�r��_option_stringsr��
field_name�	__class__s
            �r2r`zBooleanOptionalAction.__init__}s������+�M��"�"�=�1��'�'��-� '�-���*;� ;�
��&�&�}�5�,�9�J��x�
�#�+>�>��$�$��2�"�	$�9��&�&��D��)�)��G��)�)��G�
���*���������	�		r4c�p�||jvr(t||j|jd��yy)NrV)r��setattrrrZrMs     r2rQzBooleanOptionalAction.__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�$�-�-�.�.r4r6)r$r=r>r\r`rQr��
__classcell__�rbs@r2rr|s(����)�,���,�-�`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 constrB)r�rr_rir`�r+r�rr�rCr�r#r�r�r�r�rbs           �r2r`z_StoreAction.__init__�ss����A�:��K�L�
L����(�!2��?�(�J�K�K�
�l�D�*�)����������	+�
	r4c�2�t||j|�yr6)rdrrMs     r2rQz_StoreAction.__call__�s���	�4�9�9�f�-r4rRr6�r$r=r>r`rQrfrgs@r2riri�s'���
���������:.r4ric�2��eZdZ					d�fd�	Zdd�Z�xZS)�_StoreConstActionc	�:��tt|�||d||||��y)Nr)r�rr�rCr�r�r�)r_rpr`�	r+r�rrCr�r�r�r�rbs	        �r2r`z_StoreConstAction.__init__�s/���	���/�)�������	0�	r4c�F�t||j|j�yr6)rdrrCrMs     r2rQz_StoreConstAction.__call__�s���	�4�9�9�d�j�j�1r4�NNFNNr6rnrgs@r2rprp�s���
������"2r4rpc�&��eZdZ			d�fd�	Z�xZS)�_StoreTrueActionc�8��tt|�||d|||��y)NT�r�rrCr�r�r�)r_rvr`�r+r�rr�r�r�rbs      �r2r`z_StoreTrueAction.__init__�s,���	���.�)������
	/�	r4)FFN�r$r=r>r`rfrgs@r2rvrv�s���
����r4rvc�&��eZdZ			d�fd�	Z�xZS)�_StoreFalseActionc�8��tt|�||d|||��y)NFrx)r_r|r`rys      �r2r`z_StoreFalseAction.__init__s,���	���/�)������
	0�	r4)TFNrzrgs@r2r|r|s���
����r4r|c�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 appropriaterkrB)r�rr_rr`rls           �r2r`z_AppendAction.__init__ss����A�:��O�P�
P����(�!2��?�(�J�K�K�
�m�T�+�)����������	,�
	r4c��t||jd�}t|�}|j|�t	||j|�yr6)rFrrCr&rd�r+rNrOrPr�r9s      r2rQz_AppendAction.__call__0�:���	�4�9�9�d�3���E�"��
���V���	�4�9�9�e�,r4rRr6rnrgs@r2rrs'���
���������:-r4rc�2��eZdZ					d�fd�	Zdd�Z�xZS)�_AppendConstActionc
�<��tt|�||d|||||��y)Nr)r�rr�rCr�r�r�r�)r_r�r`rrs	        �r2r`z_AppendConstAction.__init__9s2���	� �$�0�)��������	1�	r4c��t||jd�}t|�}|j|j�t||j|�yr6)rFrrCr&rCrdr�s      r2rQz_AppendConstAction.__call__Ks>���	�4�9�9�d�3���E�"��
���T�Z�Z� ��	�4�9�9�e�,r4rtr6rnrgs@r2r�r�7s���
������$-r4r�c�.��eZdZ			d�fd�	Zdd�Z�xZS)�_CountActionc�8��tt|�||d|||��y)Nr)r�rr�r�r�r�)r_r�r`rys      �r2r`z_CountAction.__init__Ts+���	�l�D�*�)������
	+�	r4c�n�t||jd�}|�d}t||j|dz�y)Nrrc)rFrrd)r+rNrOrPr��counts      r2rQz_CountAction.__call__bs2���	�4�9�9�d�3���=��E��	�4�9�9�e�a�i�0r4)NFNr6rnrgs@r2r�r�Rs���
����1r4r�c�.��eZdZeedf�fd�	Zdd�Z�xZS)�_HelpActionNc�6��tt|�|||d|��y)Nr�r�rr�r�r�)r_r�r`)r+r�rr�r�rbs     �r2r`z_HelpAction.__init__ks(���
	�k�4�)�)�����	*�	r4c�D�|j�|j�yr6)�
print_help�exitrMs     r2rQz_HelpAction.__call__ws���������
r4r6�r$r=r>rr`rQrfrgs@r2r�r�is����!��	
�r4r�c�0��eZdZdeedf�fd�	Zdd�Z�xZS)�_VersionActionNc�^��|�td�}tt|�|||d|��||_y)Nz&show program's version number and exitrr�)rsr_r�r`�version)r+r�r�rr�r�rbs      �r2r`z_VersionAction.__init__~sA����<��=�>�D�
�n�d�,�)�����	-�	���r4c��|j}|�|j}|j�}|j|�|j|j	�t
j�|j�yr6)r��_get_formatterr��_print_messagerz�_sys�stdoutr�)r+rNrOrPr�r�rks       r2rQz_VersionAction.__call__�s[���,�,���?��n�n�G��)�)�+�	����7�#����i�3�3�5�t�{�{�C����
r4r6r�rgs@r2r�r�|s�����!��� 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*r_r��_ChoicesPseudoActionr`)r+r0�aliasesr�r�r�suprbs       �r2r`z/_SubParsersAction._ChoicesPseudoAction.__init__�sU���!�!�G�d���7�T�Y�Y�w�%7�7�7���)�>�>��E�C��L�L���D�!(�
�
*r4rzrgs@r2r�r��s
���	*�	*r4r�FNc	���||_||_i|_g|_tt
|�||t|j|||��y)N)r�rr�r�r�r�r�)�_prog_prefix�
_parser_class�_name_parser_map�_choices_actionsr_r�r`r)	r+r�r\�parser_classrr�r�r�rbs	        �r2r`z_SubParsersAction.__init__�sU���!���)��� "��� "���
���/�)����)�)����	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�rrsr�r�r&r�)r+r0�kwargsr��aliasr��
choice_actionrNs        r2�
add_parserz_SubParsersAction.add_parser�s���:�:�f��%�(,�(9�(9�4�@�F�6�N��*�*�Y��+���4�(�(�(���a�(C�&D�t�&K�L�L��E���-�-�-�#��!�=�>��F�H�H���V���:�:�f�%�D� �5�5�d�G�T�J�M��!�!�(�(��7�$��#�#�-�f�-��&,����d�#��E�+1�D�!�!�%�(���
r4c��|jSr6)r�r:s r2rz!_SubParsersAction._get_subactions�s���$�$�$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))rrrdr��KeyErrorr*rsr�parse_known_argsrr9�
setdefault�_UNRECOGNIZED_ARGS_ATTRrFr�)r+rNrOrPr�r�r-rv�msg�subnamespace�keyr1s            r2rQz_SubParsersAction.__call__�s
���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�*�5����O�&�&�'>��C��I�6�7�>�>�{�K���#�	+�#.�#�y�y��)>�)>�?�A�D��K�L�t�S�C���c�*�*�		+�s�C	�	ADr6)r$r=r>r
r�rr`r�rrQrfrgs@r2r�r��s2���*�v�*������.�<%�Lr4r�c��eZdZdd�Zy)�
_ExtendActionNc��t||jd�}t|�}|j|�t	||j|�yr6)rFrrCr�rdr�s      r2rQz_ExtendAction.__call__�r�r4r6)r$r=r>rQr<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�rsr�r�r�r�r��OSErrorr)r+�stringr��ervr<s`     r2rQzFileType.__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� &��3�D��>�?�G�#�G�d�N�3�3��	4�s�=6C4�4	D �=D�D c
�L�|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+rvr�r/�kw�args_strs      r2r3zFileType.__repr__2s����z�z�4�=�=�(���t�~�~�.��4�<�<�0H�I���9�9�4�E�C�3�"�9�d�3�i�E�AG�2�g�b�#�!$��*,�S�1�2�2�3�� ��:�.�.��9�9��F��2s�
B�
B�#B )r�r�NN)r$r=r>r?r`rQr3r<r4r2rrs��� �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)rd)r+r�r0s   r2r`zNamespace.__init__Es���D��D�$��t��-�r4c�\�t|t�stSt|�t|�k(Sr6)r�r�NotImplementedr)r+�others  r2�__eq__zNamespace.__eq__Is%���%��+�!�!��D�z�T�%�[�(�(r4c��||jvSr6)r8)r+r�s  r2�__contains__zNamespace.__contains__Ns���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+$)r_r�r`�description�argument_default�prefix_chars�conflict_handler�_registries�registerrirprvr|rr�r�r�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�rbs     �r2r`z_ActionsContainer.__init__Ts\���
	���/�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.register�s#���#�#�.�.�}�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�s@�������f�%��m�m�F��{�{�f�$�!'����!4���$r4c��|jD],}|j|k(s�|j�� |jcS|jj	|d�Sr6)r�rr�r�r�)r+rr�s   r2�get_defaultz_ActionsContainer.get_default�sH���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#rr	r�r�r�_add_action)r+rvr��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��� ��2;�>�?�
?��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+rvr�r�s    r2�add_argument_groupz$_ActionsContainer.add_argument_group�s/���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_group�s*��'��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   r2rz_ActionsContainer._add_action�s������V�$�	
�
�
���V�$����$�2�2�M�9?�D�'�'�
�6�3�$�2�2�M��,�,�2�2�=�A��:�:��7�7�>�>�t�D�3��
r4c�:�|jj|�yr6)r�rYrs  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�rrsr�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�sG�����(�(�E��{�{�o�-��H�I�� �����!4�5�5�+0�O�E�K�K�(�	)��	��-�-�E��{�{�/�1�/3�/F�/F��+�+� %� 1� 1�%*�%;�%;�0G�0=�����,� �.�.��$3�E�K�K�$@�	�&�!�/�.�"�9�9�E��;�;����<�)�K� �.�.��$/�	�&�!�/�:� �(�(�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�)rsrr�rrrt)r+rr�r�s    r2rz(_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�rsr)	r�rsr�r&r�r��lstrip�replacert)	r+rvr�r��long_option_stringsr�r�r�dest_option_strings	         r2rz&_ActionsContainer._get_optional_kwargs3s���� ��!�M� ��#�t�'8�'8�8�"/�(,�(9�(9�;���G�H�� ��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    r2rz#_ActionsContainer._pop_action_classUs'�����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�rFrrsr�)r+�handler_func_namer�s   r2r�z_ActionsContainer._get_handlerYsV��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      r2rz!_ActionsContainer._check_conflictbsm����#�2�2�M��� ;� ;�;�!%�!<�!<�]�!K���&�&�
�~�'F�G�3��#�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_actionsr<r��conflict_strings      r2�_handle_conflict_errorz(_ActionsContainer._handle_conflict_errorps^���:�;��2�3�5���)�)�(;�%=�)>���&3�%=�>���F�G�o�$=�>�>��%=s�A

c���|D]d\}}|jj|�|jj|d�|jr�J|jj|��fyr6)r�rYr�r�rr)r+r�r-r�s    r2�_handle_conflict_resolvez*_ActionsContainer._handle_conflict_resolveys^��&9�!�M�6�
�!�!�(�(��7��'�'�+�+�M�4�@��(�(�� � �/�/��7�&9r4r6)r$r=r>r`r�r�r�rr�rrrrrrrrr�rr/r1rfrgs@r2r�r�Rsc���01�j!�C�5�.�1(�f�
�
�*%�&<�P:�  F�D<�:�6�?�8r4r�c�>��eZdZd�fd�	Z�fd�Z�fd�Z�fd�Z�xZS)r
c���|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�r_r
r`rr�r�r�r�r�r�r�)r+rrr�r�r��
super_initrbs       �r2r`z_ArgumentGroup.__init__�s�����"�"���!�9�#=�#=�>��~�y�5�5�6��!�9�#=�#=�>��>�4�9�
��5�{�5�f�5���
� ���%�0�0���!�*�*��
�&/�&F�&F��#�"�,�,����4�4�	
�+�*3�*N�*N��'r4c�d��tt|�|�}|jj	|�|Sr6)r_r
rr�r&�r+r�rbs  �r2rz_ArgumentGroup._add_action�s-����~�t�8��@�����"�"�6�*��
r4c�b��tt|�|�|jj	|�yr6)r_r
rr�rYr6s  �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)r]�warn�DeprecationWarningr_r�r+rvr�rbs   �r2rz!_ArgumentGroup.add_argument_group�s/����
�
�4�'��	
�
�w�)�4�:�6�:�:r4�NN)r$r=r>r`rrrrfrgs@r2r
r
�s���O�,�
+�;�;r4r
c�6��eZdZd�fd�	Zd�Zd�Z�fd�Z�xZS)rc�H��tt|�|�||_||_yr6)r_rr`r��
_container)r+rr�rbs   �r2r`z _MutuallyExclusiveGroup.__init__�s!���
�%�t�5�i�@� ��
�#��r4c��|jrtd�}t|��|jj	|�}|j
j
|�|S)Nz-mutually exclusive arguments must be optional)r�rsr�rBrr�r&)r+r�r�s   r2rz#_MutuallyExclusiveGroup._add_action�sK���?�?��C�D�C��S�/�!����,�,�V�4�����"�"�6�*��
r4c�p�|jj|�|jj|�yr6)rBrr�rYrs  r2rz&_MutuallyExclusiveGroup._remove_action�s(�����&�&�v�.����"�"�6�*r4c�Z��tjdtd��t�|�|i|��S)Nz0Nesting mutually exclusive groups is deprecated.rFr9)r]r<r=r_rr>s   �r2rz4_MutuallyExclusiveGroup.add_mutually_exclusive_group�s/����
�
�>�'��	
�
�w�3�T�D�V�D�Dr4)F)r$r=r>r`rrrrfrgs@r2rr�s���$�
�+�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�)r_rr`�_os�path�basenamer��argvr\r��epilog�formatter_class�fromfile_prefix_chars�add_help�allow_abbrev�
exit_on_errorrrs�_positionals�
_optionals�_subparsersr�r�rrr�r�r)r+r\r�r�rP�parentsrQr�rRr�r�rSrTrU�	superinit�	add_grouprJ�default_prefixrl�defaultsrbs                    �r2r`zArgumentParser.__init__�sp����.�$�8�	��k�+�#3�#3�	5��<��8�8�$�$�T�Y�Y�q�\�2�D���	���
����.���%:��"� ��
�(���*����+�+�	�%�a�(>�&?�@���#�A�i�L�1������	��
�
�f�d�H�-�!$�|� 3���a����=�=�����s�"�N�1�$4�V�$;��x��8�9�
�
;��F��'�'��/�
0�!�+�+�����%�%�h�/���"�
��
�s�5E�	E+�*E+c�L�gd�}|D�cgc]}|t||�f��c}Scc}w)N)r\r�r�rQr�rSrErGs   r2r(zArgumentParser._get_kwargs&s+��
��9>�>���w�t�T�*�+�>�>��>rIc��|j�tdtd���|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<)rXrrsr�r#r�rrVr�r��_get_positional_actionsr�r�r�rzr�rr)	r+r�rr�rkr�r��
parsers_classr�s	         r2�add_subparserszArgumentParser.add_subparsers4s?�����'���a�(R�&S�T�T�	���.�$�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�rWrrVrs  r2rzArgumentParser._add_actionSs?��� � ��O�O�'�'��/��
�
���)�)�&�1��
r4c�X�|jD�cgc]}|jr|��c}Scc}wr6�r�r�rs  r2�_get_optional_actionsz$ArgumentParser._get_optional_actionsZs/��"�m�m�*���(�(��*�	*��*��'c�X�|jD�cgc]}|js|��c}Scc}wr6rfrs  r2raz&ArgumentParser._get_positional_actions_s/��"�m�m�.���,�,��.�	.��.rhc���|j||�\}}|rHtd�dj|�z}|jr|j	|�|Std|��|S�Nzunrecognized arguments: %sr�)r�rsr*rUr�r�r+rvrOrOr�s     r2�
parse_argszArgumentParser.parse_argsgsb���*�*�4��;�
��d���0�1�C�H�H�T�N�B�C��!�!��
�
�3����$�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�rOr7rr�rrr	r�rdr�rU�_parse_known_argsrr�r�r�r�rF�delattr)r+rvrOr�r�errs      r2r�zArgumentParser.parse_known_argsqs@���<��9�9�Q�R�=�D���:�D���!��I��m�m�F��{�{�(�*��y�&�+�+�6��~�~�X�5��	�6�;�;����G�	$��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	�B��������� �!�"��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\r|��c}�}||k7r||�}||kDr|}�8|}|�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't5dt7d�d
j|�z���jD]�}|j s�|jD]}|�!vs��&|jD�cgc]}|j8t:urt#|���!}}t7d�}t5d|dj|�z����fScc}wcc}w)NrcrUr��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�rsr8rr)r��argument_stringsr��argument_values�conflict_actionr��action_name�action_conflictsrO�seen_actions�seen_non_default_actionsr+s       �����r2�take_actionz5ArgumentParser._parse_known_args.<locals>.take_action�s�������V�$�"�.�.�v�7G�H�O�
�f�n�n�4�(�,�,�V�4�'7�';�';�F�B�'G�O�&�*B�B�� >�?��&6��&G��+�F�C�+�4E�F�F�	(H��h�.��t�Y���G�/r4c�����|}|\}}}}�j}g}	|��j�|�|dzS|��||d�}�j}	|dk(r�|d|	vr�|dk7r�|s|d|	vrtd�}
t	||
|z��|j|g|f�|d}||dz}�j
}||vr$||}|dd}|sdx}}n�|ddk(rd}|dd}n�d}n��j||z�|dz}
np|dk(r|dz}
|g}|j|||f�nNtd�}
t	||
|z��|dz}�|d}|||�}||z}
�||
}|j|||f�n��E|D]\}}}�|||��|
S)Nrcrsrrozignored explicit argument %rr)�_match_argumentr&r�rsrr�)�start_index�option_tupler�r��sep�explicit_arg�match_argument�
action_tuples�	arg_countr	r��char�
optionals_map�stoprvr��selected_patternsr-�arg_strings_pattern�extras�option_string_indicesr+r~s                 ������r2�consume_optionalz:ArgumentParser._parse_known_args.<locals>.consume_optional�s,���1��=�L�7C�4�F�M�3��"�1�1�N��M���>��M�M�+�k�":�;�&��?�*� �+� .�v�s� ;�I�
!�-�-�E�!�Q��)�!�,�E�9�(�B�.��,�q�/�U�":�"#�$B�"C�C�"/���l�8J�"K�K�%�,�,�f�b�-�-H�I�,�Q�/��(,�|�A��(>�
�(,�(C�(C�
�(�M�9�%2�=�%A�F�+7���+;�L�#/�59� 9��l�!-�a��C�!7�&)��/;�A�B�/?��&(��"�M�M�$��*=�>�#.��?�D�!�#�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��E�N0=�+���m��F�D�-�8�0=��Kr4c����
j}�|d}|�	|�}t�	|�D]\}}�|||z}||z
}�||���	t|�d�	dd|Sr6)�_match_arguments_partial�zipr�)r��
match_partial�selected_pattern�
arg_countsr�r�rvr-r�r�r+r~s       �����r2�consume_positionalsz=ArgumentParser._parse_known_args.<locals>.consume_positionals5s���� �9�9�M�2�;�<�@��&�{�4D�E�J�&)��j�%A�!��	�"�;��i�0G�H���y�(���F�D�)�&B�)��Z��)9�:�K��N��r4rr�z(the following arguments are required: %sr!z#one of the arguments %s is requiredr�r6)rR�_read_args_from_filesr�r�r�r�r��iterr&�_parse_optionalr*r�rarNrMr�r�r8r�r�r�r	rrFrd�
_get_valuerrsr�r)#r+r-rOrr�r��mutex_action�	conflicts�arg_string_pattern_parts�arg_strings_iter�
arg_stringr��patternr�r�r��max_option_string_indexr��next_option_string_index�positionals_end_index�strings�
stop_index�required_actionsr�r�rHr�r{r�r�r�r�r|r}r~s#```                        @@@@@@@@r2roz ArgumentParser._parse_known_args�s������%�%�1��4�4�[�A�K����:�:�K�'�6�6�M�#,�[�-G�-G�#H���<�,�7�7��b�I�	�� � ��r��!2�3�� � ��q�1�u�v�!6�7�$I�;�!#��#%� ���,��&�'7�8�M�A�z��T�!�(�/�/��4�"2�J�,�3�3�C�8�#3� $�3�3�J�?���'�!�G�/;�)�!�,�!�G�(�/�/��8�#9�(!�g�g�&>�?���u��#&�5� �	H�	H�*S	�S	�n�2�2�4��	�	�(���� �&)�*?�&@�#�&(�#��4�4�(+�2�,)���K�'��,)�(*�$��6�6�(;�K�(H�%�)�;�6�"7�K��"7�K��"7�7�%�k�2J�K���
�
�g�&�6��+�;�7�K�5�4�4�:)��5�
�	�
�
�k�*�+�.�/����m�m�F��\�)��?�?�$�+�+�,<�V�,D�E����2�"�6�>�>�3�7��	�6�;�;�7����'�)�V�[�[�*I�I��	�6�;�;� $������� G�I�$� ���a�(R�&S��y�y�!1�2�'3�4�
4��4�4�E��~�~�#�2�2�F��!9�9��3�,1�+?�+?�=�!'� &���8� ;�.�f�5�=�E�=��A�B�C�'��c�C�H�H�U�O�.C�D�D�5��&� � ��M,)��~=s�N�$Nc� �g}|D]�}|r|d|jvr|j|��(	t|ddtj�tj
���5}g}|j
�j�D])}|j|�D]}|j|���+|j|�}|j|�ddd���|S#1swY�
xYw#t$r}tdt|���d}~wwxYw)Nrrc)r�r�)rRr&r�r��getfilesystemencoding�getfilesystemencodeerrors�readr(�convert_arg_line_to_argsr�r�r�rr�)r+r-�new_arg_stringsr��	args_file�arg_liner/rqs        r2r�z$ArgumentParser._read_args_from_files�s
����%�J���A��d�6P�6P�!P��&�&�z�2�8��j���n�'+�'A�'A�'C�%)�%C�%C�%E�G�<�JS�&(��(1���(8�(C�(C�(E�H�'+�'D�'D�X�'N�� +� 2� 2�3� 7�(O�)F�'+�&@�&@��&M��'�.�.�{�;�<��&�,��<�<���8�'��c�#�h�7�7��8�s0�5C*�#A/C�C*�C'	�#C*�*	D
�3D�D
c��|gSr6r<)r+r�s  r2r�z'ArgumentParser.convert_arg_line_to_args�s
���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_patternrWrrsrrr�r�rrr�r�)r+r�r��
nargs_patternr�nargs_errorsr�s       r2r�zArgumentParser._match_argument�s����/�/��7�
��	�	�-�)<�=���=��a�/�0��!�;�<��Q�?�@��L�
�"�"�6�<�<�0�C��{��5�6�%�|�|�-�/5�|�|�<�� ���,�,��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�rWrr�r�)
r+r�r�r�r��
actions_slicer�r�rr�s
          r2r�z'ArgumentParser._match_arguments_partial�s������s�7�|�Q��+�A�#�B�Q�K�M��g�g�-:�<�#)� $�6�6�v�>�<�=�G��I�I�g�':�;�E�� ��
�
�����H�v�s�6�{�H�I���
�,��
��<��Is�B$
�B)
c�r�|sy|d|jvry||jvr|j|}||ddfSt|�dk(ry|jd�\}}}|r#||jvr|j|}||||fS|j	|�}t|�dkDrIdj|D����cgc]	\}}}}|��c}}}}�}||d�}t
d�}	td|	|z��t|�dk(r|\}
|
S|jj|�r
|jsyd|vryd|ddfScc}}}}w)Nrrcrr!)r!�matchesz4ambiguous option: %(option)s could match %(matches)sr�)r�r�r��	partition�_get_option_tuplesr*rsrr�rr�)r+r�r�r�r�r��
option_tuplesrHrvr�r�s           r2r�zArgumentParser._parse_optional�s������!�}�� 1� 1�1����4�4�4��0�0��<�F��:�t�T�1�1��z�?�a���,6�+?�+?��+D�(�
�s�L��=�D�$?�$?�?��0�0��?�F��=�#�|�;�;��/�/�
�;�
��}���!��i�i�@M�!O�!O�<�F�M�3��"/�!O�P�G�(�W�=�D��J�K�C���c�D�j�1�1���
�1�
$�)�M�L���
�(�(�.�.�z�:��6�6���*����Z��t�+�+��3!Os�3D1c�p�g}|j}|d|vry|d|vrr|jrd|jd�\}}}|sdx}}|jD]:}|j	|�s�|j|}||||f}|j|��<|S|d|vr�|d|vr�|}|dd}	|dd}
|jD]f}||	k(r'|j|}||d|
f}|j|��/|j	|�s�A|j|}||ddf}|j|��h|St
dtd�|z��)NrrcrrFrozunexpected option string: %s)r�rTr�r�rZr&rrs)r+r�r�r	�
option_prefixr�r�r�r��short_option_prefix�short_explicit_args           r2r�z!ArgumentParser._get_option_tuples	s������!�!�����u�$��q�)9�U�)B�� � �3@�3J�3J�3�3O�0�
�s�L��)-�-�C�,�%)�%@�%@�M�$�/�/�
�>�!%�!<�!<�]�!K��$�m�S�,�F���
�
�c�*�	&A�:�
�)�1�
��
&�=��+;�5�+H�)�M�"/���"3��!.�q�r�!2��!%�!<�!<�
� �$7�7�!�8�8��G�F� �-��5G�G�C��M�M�#�&�"�-�-�m�<�!�8�8��G�F� �-��t�;�C��M�M�#�&�"=��
� ��a�(F�&G�-�&W�X�Xr4c�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-*rsror�)
r�rrrrrrr*r�r#)r+r�r�r�s    r2r�z!ArgumentParser._get_nargs_patternA	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||�\}}|rHtd�dj|�z}|jr|j	|�|Std|��|Srk)�parse_known_intermixed_argsrsr*rUr�rrls     r2�parse_intermixed_argsz$ArgumentParser.parse_intermixed_argsr	sb���5�5�d�I�F�
��d���0�1�C�H�H�T�N�B�C��!�!��
�
�3����$�D�#�.�.��r4c���|j�}|D�cgc]}|jttfvr|��}}|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�)r<zDo not expect z in F)rar�rrrr�r�rr�r��
save_nargsrr��save_defaultr�r	rFr]r<rprgr��
save_required)r+rvrOr�r��ar��
save_usage�remaining_argsr<r�r�s            r2r�z*ArgumentParser.parse_known_intermixed_args|	s����2�2�4��"-�
5������� 3�3��
5��
5���-�-.�q�T�Z�Z�8�9�
9�&*�%D�%D�I�E��.�.�I��&�K�2G�
�K�K�I�K�I��6�7�
7�.	$����J�
9��:�:�%�!%�!2�!2�!4�Q�R�!8�D�J�)�F�(.���F�%�#+�F�L�*0�.�.�F�'�%-�F�N�
*�-1�,A�,A�$�BK�-M�)�	�>�)�F��	�6�;�;�7� '�	�6�;�;� ?�� C�1�����i�P�Q��	�6�;�;�7�
*�*�F�#)�#4�#4�F�L�%+�%8�%8�F�N�*��2�2�4�I�
9�(�F�+1�?�?�F�(�&+�F�O�(�"�<�<�E�*/�.�.�E�'�%*�E�N�=�%)�$9�$9�.�:C�%E�!�	�6�(�F�&,�&:�&:�F�O�(�!�<�<�E�%*�%8�%8�E�N�=�$�D�J��&� � ��u
5��I��:*�F�#)�#4�#4�F�L�%+�%8�%8�F�N�*��"(�F�&,�&:�&:�F�O�(�!�<�<�E�%*�%8�%8�E�N�=��$�D�J�sU�!I,�$(I1�K$�)BI7�=I7�6I7�:K$�	AJ%�&:K$�7+J"�"K$�%<K!�!K$�$	K-c�j�|js*|jttfvr	|j	d�|sn|jtk(r[|jr
|j}n|j}t|t�r$|j||�}|j||�|S|sO|jtk(r<|js0|j� |j}|j||�|S|}|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)NrUrcr)r�r�rrrYr�rrCr�r�r�r��_check_valuerr�r)r+r�r-r1r��vs      r2rvzArgumentParser._get_values�	s(���$�$����f�i�=P�)P�
��"�"�4�(�
�v�|�|�x�7��$�$����������%��%������6���!�!�&�%�0�P��I�&�,�,�,�">��'�'��~�~�)������!�!�&�%�0�@��9$��8��3��
��
"�v�|�|��h�7G�'G�%�K�J��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����!�!�&�!�,�����g�
��
��BF��F��Fs#�H�H&�H+� H0�	H#�"H#c��|jd|j|j�}t|�std�}t	|||z��	||�}|S#t
$r}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#rrsrrr�rr�rFr')	r+r�r�rr�r�rqr0rvs	         r2r�zArgumentParser._get_value
s����&�&�v�v�{�{�F�K�K�H�	��	�"��(�)�C����i��8�8�
	4��z�*�F��
��!�	-��c�(�C����,�,���:�&�	4��6�;�;�
�D����4E�F�D� �:�6�D��7�8�C����d�
�3�3�		4�s�A�	C�!A8�8ACc���|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'rsr)r+r�r1rvr�s     r2r�zArgumentParser._check_value
s^���>�>�%�%�v�~�~�*E�"�#�y�y��T�6�>�>�)B�C�E�D��I�J�C����d�
�3�3�	+F�%r4c��|j�}|j|j|j|j�|j�Sr6)r�r�r�r�r�rz)r+rks  r2r�zArgumentParser.format_usage'
sB���'�'�)�	����D�J�J��
�
� �;�;�	=��$�$�&�&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�rrr�r�r�rPrz)r+rk�action_groups   r2rzzArgumentParser.format_help-
s����'�'�)�	�	���D�J�J��
�
� �;�;�	=�	���4�+�+�,�!�/�/�L��#�#�L�$6�$6�7����|�7�7�8��#�#�L�$?�$?�@��!�!�#�	0�	���4�;�;�'��$�$�&�&r4c�:�|j|j��S)Nr�)rQr\r:s r2r�zArgumentParser._get_formatterD
s���#�#����#�3�3r4c�h�|�tj}|j|j�|�yr6)r�r�r�r��r+�files  r2�print_usagezArgumentParser.print_usageJ
s)���<��;�;�D����D�-�-�/��6r4c�h�|�tj}|j|j�|�yr6)r�r�r�rzr�s  r2r�zArgumentParser.print_helpO
s)���<��;�;�D����D�,�,�.��5r4c��|r'|xstj}	|j|�yy#ttf$rYywxYwr6)r��stderr�writerr�)r+r<r�s   r2r�zArgumentParser._print_messageT
sB����&�4�;�;�D�
��
�
�7�#���#�G�,�
��
�s�+�=�=c�r�|r |j|tj�tj|�yr6)r�r�r�r�)r+�statusr<s   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\r<rFz%(prog)s: error: %(message)s
N)r�r�r�r\r�rs)r+r<rvs   r2r�zArgumentParser.errord
s=��	
������%��	�	�g�6���	�	�!�Q�7�8�4�?�@r4r?r6)rN)#r$r=r>r?rr`r(rcrrgrarmr�ror�r�r�r�r�r�r�r�r�rvr�r�r�rzr�r�r�r�r�r�rfrgs@r2rr�s�����,��!���!.�!�'+�"&�")��"�#�=0�D	?��>�*�
.��$�LA!�F�6�#�,� 7,�r(�T+�b�H!�Z8�t�24�'�'�.4�7�
6�
��
Ar4r)4r?�__version__�__all__�osrL�rerW�sysr�r]rrsrrrrrrrr�r!rrCrr	r
rrr8�	Exceptionrrr
r\rrirprvr|rr�r�r�r�r�r�rrr�r
rrr<r4r2�<module>r�s���;�z����,����*���������	���	�.���v��>	�"H�F�H�VQ�-�Q�!�6�!��M��:$�}�$�&�?�I�?�(	�	�	�\@�
�\@�@�h��6/�F�6/�r .�6� .�F2��2�.�(��"�)��"#-�F�#-�L-��-�61�6�1�.�&��&�V��8bL��bL�H-�M�-�1:�v�1:�n$� �$�(s8��s8�l	';�&�';�TE�n�E�8aA�%�'8�aAr4

Hacked By AnonymousFox1.0, Coded By AnonymousFox