https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/awscli/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/awscli/__pycache__/argparser.cpython-310.pyc
o

�s�a��@s�ddlZddlZddlmZddlmZdZdZdeZGdd�dej	�Z
Gd	d
�d
ej�ZGdd�de�Z
Gd
d�de�ZGdd�de�ZdS)�N)�six)�get_close_matchesaNote: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.htmlzbTo see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
zQ
%s

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
csDeZdZdZ�fdd�Zd
dd�Zedd��Zejd	d��Z�Z	S)�
CommandActionz�Custom action for CLI command arguments

    Allows the choices for the argument to be mutable. The choices
    are dynamically retrieved from the keys of the referenced command
    table
    cs*||_tt|�j||fd|ji|��dS)N�choices)�
command_table�superr�__init__r)�self�option_strings�destr�kwargs��	__class__��2/usr/lib/python3/dist-packages/awscli/argparser.pyr1s
��
�zCommandAction.__init__NcCst||j|�dS�N)�setattrr)r	�parser�	namespace�values�
option_stringrrr�__call__7szCommandAction.__call__cCst|j���Sr)�listr�keys)r	rrrr:szCommandAction.choicescCsdSrr)r	�valrrrr>sr)
�__name__�
__module__�__qualname__�__doc__rr�propertyr�setter�
__classcell__rrr
rr*s

rcs0eZdZejZdZdd�Zd�fdd�	Z�Z	S)�CLIArgParser�c
Cs�|jdurd||jvrfdg}tt|j��dd|j�D] }g}|j|||j�D]	}|�d|�q(|�d�|��qt||jdd�}|r[d|g}|D]	}	|�d|	�qL|�|�t�	|d	�|���dSdS)
z�
        It's probably not a great idea to override a "hidden" method
        but the default behavior is pretty ugly and there doesn't
        seem to be any other way to change it.
        Nz#Invalid choice, valid choices are:
z%-40sz | g�������?)�cutoffz'

Invalid choice: %r, maybe you meant:
z  * %s�
)
r�range�len�ChoicesPerLine�append�joinr�extend�argparse�
ArgumentError)
r	�action�value�msg�i�current�choice�possible�extra�wordrrr�_check_valueNs

�zCLIArgParser._check_valueNc
s�tt|��||�\}}ttjdd�}|durd}t|���D]:\}}t|t	j
�r2t|||�|��qt|t
�rXg}|D]}	t|	t	j
�rL|�|	�|��q;|�|	�q;t|||�q||fS)N�encodingzutf-8)rr"�parse_known_args�getattr�sys�stdin�vars�items�
isinstancer�binary_typer�decoderr))
r	�argsr�parsed�	remaining�terminal_encoding�argr/�encoded�vr
rrr9ds 
�zCLIArgParser.parse_known_argsr)
rrrr,�RawTextHelpFormatter�	Formatterr(r7r9r!rrr
rr"Gs
r"cs6eZdZejZ	d�fdd�	Zdd�Zdd�Z�Z	S)	�
MainArgParserNcs0tt|�j|jdd|t|d�|�|||�dS)NF�resolve)�formatter_class�add_help�conflict_handler�description�usage�prog)rrKrrJ�USAGE�_build)r	r�version_stringrP�argument_tablerRr
rrr}s
�zMainArgParser.__init__cCs"d}t|�D]}|d|7}q|S)N�z* %s
)�sorted)r	r�help_strr3rrr�_create_choice_help�sz!MainArgParser._create_choice_helpcCsB|D]}||}|�|�q|jdd|dd�|jdt|d�dS)Nz	--version�versionz Display the version of this tool)r.r[�help�command�r.r��
add_to_parser�add_argumentr)r	rrUrV�
argument_name�argumentrrrrT�s�
�zMainArgParser._buildr)
rrrr,rIrJrrZrTr!rrr
rrKzs�rKcs$eZdZ�fdd�Zdd�Z�ZS)�ServiceArgParsercs.tt|�jtjddtd�|�|�||_dS)NFrL)rMrNrOrQ)rrdrr,rIrSrT�
_service_name)r	�operations_table�service_namer
rrr�s
�

zServiceArgParser.__init__cCs|jdt|d�dS)N�	operationr^)rar)r	rfrrrrT�s
�zServiceArgParser._build)rrrrrTr!rrr
rrd�s	rdcs8eZdZdZd	�fdd�	Zdd�Zd	�fdd�	Z�ZS)
�ArgTableArgParserz*CLI arg parser based on an argument table.Ncs6tt|�j|jdtdd�|duri}|�||�dS)NFrL)rMrNrQrO)rrirrJrSrT)r	rVrr
rrr�s
�zArgTableArgParser.__init__cCs:|D]}||}|�|�q|r|jdt|dd�dSdS)N�
subcommand�?)r.r�nargsr_)r	rVr�arg_namercrrrrT�s
��zArgTableArgParser._buildcs@t|�dkr|ddkrt��}d|_|gfStt|��||�S)N�rr\)r'r,�	Namespacer\rrir9)r	rBrr
rrr9�s
�z"ArgTableArgParser.parse_known_argsr)rrrrrrTr9r!rrr
rri�s

ri)r,r;�
awscli.compatr�difflibr�AWS_CLI_V2_MESSAGE�
HELP_BLURBrS�Actionr�ArgumentParserr"rKrdrirrrr�<module>s"�	���3

https://t.me/RX1948 - 2025