Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clwpos/__pycache__/parse.cpython-311.pyc
�

�m_e	���ddlmZddlZddlmZmZmZmZddlm	Z	Gd�dej
ej��ZGd�d��Z
dS)	�)�absolute_importN)�Tuple�List�Dict�Any)�is_cl_shared_pro_editionc���eZdZ�fd�Z�xZS)�CustomFormatterc�D��t��j|i|�ddd���dS)N���)�width�max_help_position)�super�__init__)�self�args�kwargs�	__class__s   ��C/opt/cloudlinux/venv/lib64/python3.11/site-packages/clwpos/parse.pyrzCustomFormatter.__init__s2��������$�J�&�J��r�J�J�J�J�J�J�J�)�__name__�
__module__�__qualname__r�
__classcell__)rs@rr
r
sA�������K�K�K�K�K�K�K�K�Krr
c�p�eZdZdZd�Zd
d�Zd�Zdeeee	e
ee	fffd�Zd	�Z
dS)�ArgumentParserzHelper to create parsers.c��tj|i|��|_|j�ddd���|_i|_|jj|_dS)N�commandTz	{command})�dest�required�metavar)�argparser�_parser�add_subparsers�
_subparser�_subparsers�add_argument)rrrs   rrzArgumentParser.__init__sU���.��?��?�?����,�5�5�9�t�]h�5�i�i������!�L�5����rNFc����������fd�}|S)Nc���t��s�s;�jj|j�dd��fd�i����j|j<|S)N�_�-�allow_abbrev)rr&�
add_parserr�replacer')�methodr-r�only_for_shared_prors ����r�	decoratorz)ArgumentParser.command.<locals>.decoratorsl���'�)�)�
�1D�
�4N�D�O�4N��O�+�+�C��5�5�5�5�!-�5��5�5�� ���1�
�Mr�)rr1r-rr2s```` rrzArgumentParser.commands6������	�	�	�	�	�	�	�	��rc��������fd�}|S)Nc�B���j|jj�i���|S�N)r'rr()r0rrrs ���rr2z*ArgumentParser.argument.<locals>.decorator+s*���:�D��V�_�-�:�D�K�F�K�K�K��Mrr3)rrrr2s``` r�argumentzArgumentParser.argument*s0�����	�	�	�	�	�	�	��r�arguments_paramsc��������fd�}|S)z�
        Create mutually exclusive group with arguments
        `argument_params` is a list of tuples with *args and **kwargs to create arguments in the group
        c�~���j|jjdi���}�D]}|j|di|d���|S)Nr�r3)r'r�add_mutually_exclusive_groupr()r0�groupr7r8rrs   ���rr2z8ArgumentParser.mutual_exclusive_group.<locals>.decorator:s_���R�D�$�V�_�5�R�\�\�U[�\�\�E�,�
@�
@��"��"�H�Q�K�?�8�A�;�?�?�?�?��Mrr3)rr8rr2s``` r�mutual_exclusive_groupz%ArgumentParser.mutual_exclusive_group1s0�����	�	�	�	�	�	�	��rc�6�|j�|��Sr6)r$�
parse_args)rrs  rr@zArgumentParser.parse_argsCs���|�&�&�t�,�,�,r)NF)rrr�__doc__rrr7rrrr�strr>r@r3rrrrs�������#�#�6�6�6�
�
�
�
�����"�5��c��D��c��N�)B�#C�D�����$-�-�-�-�-rr)�
__future__rr#�typingrrrr�clcommon.lib.cleditionr�ArgumentDefaultsHelpFormatter�
HelpFormatterr
rr3rr�<module>rHs���'�&�&�&�&�&�����)�)�)�)�)�)�)�)�)�)�)�)�;�;�;�;�;�;�K�K�K�K�K�h�<�h�>T�K�K�K�
0-�0-�0-�0-�0-�0-�0-�0-�0-�0-r