Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/click/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/click/__pycache__/exceptions.cpython-310.pyc
o

�+ca�#�@s0ddlZddlZddlmZddlmZddlmZddlm	Z	ej
r/ddlmZddlm
Z
d	ejejejeefd
ejefdd�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZdS)!�N)�gettext)�ngettext�)�get_text_stderr)�echo)�Context)�	Parameter�
param_hint�returncCs*|durt|t�sd�dd�|D��S|S)Nz / css�|]}t|�VqdS�N)�repr)�.0�x�r�2/usr/lib/python3/dist-packages/click/exceptions.py�	<genexpr>s�z$_join_param_hints.<locals>.<genexpr>)�
isinstance�str�join)r	rrr�_join_param_hintssrcsfeZdZdZdZdeddf�fdd�Zdefdd	�Zdefd
d�Zdde	j
e	jddfd
d�Z�Z
S)�ClickExceptionz8An exception that Click can handle and show to the user.r�messager
Ncst��|�||_dSr)�super�__init__r)�selfr��	__class__rrrs
zClickException.__init__cC�|jSr�r�rrrr�format_message!�zClickException.format_messagecCrrrrrrr�__str__$r!zClickException.__str__�filecCs.|durt�}ttd�j|��d�|d�dS)N�Error: {message}r)r#)rr�_�formatr )rr#rrr�show's zClickException.showr)�__name__�
__module__�__qualname__�__doc__�	exit_coderrr r"�t�Optional�IOr'�
__classcell__rrrrrs$rcsVeZdZdZdZd
dedejdddf�fdd	�
Zd
d
ejej	ddfdd�Z
�ZS)�
UsageErrora+An internal exception that signals a usage error.  This typically
    aborts any further handling.

    :param message: the error message to display.
    :param ctx: optionally the context that caused this error.  Click will
                fill in the context automatically in some situations.
    �Nr�ctxrr
cs0t��|�||_|jr|jj|_dSd|_dSr)rrr3�command�cmd)rrr3rrrr9szUsageError.__init__r#cCs�|durt�}d}d}|jdur.|jj�|j�dur.td�j|jj|jjdd�}|�d�}|jdurF|jj}t	|j�
��d|��||d�t	td�j|��d�||d�dS)	N�z"Try '{command} {option}' for help.r)r4�option�
)r#�colorr$r)rr3r4�get_help_optionr%r&�command_path�help_option_namesr9r�	get_usager )rr#r9�hintrrrr'>s$
�


�zUsageError.showr)r(r)r*r+r,rr-r.rr/r'r0rrrrr1.s
"$r1cs^eZdZdZ			ddedejddejddejed	df
�fd
d�
Zd	efdd
�Z�Z	S)�BadParametera
An exception that formats out a standardized error message for a
    bad parameter.  This is useful when thrown from a callback or type as
    Click will attach contextual information to it (for instance, which
    parameter it is).

    .. versionadded:: 2.0

    :param param: the parameter object that caused this error.  This can
                  be left out, and Click will attach this info itself
                  if possible.
    :param param_hint: a string that shows up as parameter name.  This
                       can be used as alternative to `param` in cases
                       where custom validation should happen.  If it is
                       a string it's used as such, if it's a list then
                       each item is quoted and separated.
    Nrr3r�paramrr	r
cst��||�||_||_dSr)rrr@r	)rrr3r@r	rrrrgs
zBadParameter.__init__cCsV|jdur	|j}n|jdur|j�|j�}n	td�j|jd�Std�jt|�|jd�S)NzInvalid value: {message}rz)Invalid value for {param_hint}: {message})r	r)r	r@�get_error_hintr3r%r&rr)rr	rrrr rs


�zBadParameter.format_message�NNN�
r(r)r*r+rr-r.rr r0rrrrr?Us"������r?c
s�eZdZdZ					ddejedejddejddejed	ejed
df�fdd�
Zd
efd
d�Zd
efdd�Z	�Z
S)�MissingParametera�Raised if click required an option or argument but it was not
    provided when invoking the script.

    .. versionadded:: 4.0

    :param param_type: a string that indicates the type of the parameter.
                       The default is to inherit the parameter type from
                       the given `param`.  Valid values are ``'parameter'``,
                       ``'option'`` or ``'argument'``.
    Nrr3rr@rr	�
param_typer
cs t��|pd|||�||_dS)Nr6)rrrE)rrr3r@r	rErrrr�s
zMissingParameter.__init__cCs|jdur	|j}n|jdur|j�|j�}nd}t|�}|r#d|��nd}|j}|dur5|jdur5|jj}|j}|jdurS|jj�	|j�}|rS|rQ|d|��7}n|}|rZd|��nd}|dkret
d�}n|dkrnt
d�}n|dkrwt
d	�}nt
d
�j|d�}|�|�d|��S)
N� r6z. �argumentzMissing argumentr7zMissing option�	parameterzMissing parameterzMissing {param_type})rE�.)r	r@rAr3rrE�param_type_namer�type�get_missing_messager%r&)rr	rE�msg�	msg_extra�missingrrrr �s4





zMissingParameter.format_messagecCs.|js|jr
|jjnd}td�j|d�S|jS)NzMissing parameter: {param_name})�
param_name)rr@�namer%r&)rrPrrrr"�szMissingParameter.__str__)NNNNN)r(r)r*r+r-r.rrr r"r0rrrrrDs,
�������&rDcsdeZdZdZ			d
dedejedejejedejdddf
�fd	d
�
Zdefdd�Z	�Z
S)�NoSuchOptionzfRaised if click attempted to handle an option that does not
    exist.

    .. versionadded:: 4.0
    N�option_namer�
possibilitiesr3rr
cs6|durtd�j|d�}t��||�||_||_dS)NzNo such option: {name})rQ)r%r&rrrSrT)rrSrrTr3rrrr�s

zNoSuchOption.__init__cCsH|js|jSd�t|j��}tddt|j��j||d�}|j�d|��S)Nz, zDid you mean {possibility}?z#(Possible options: {possibilities}))�possibilityrTrF)rTrr�sortedr�lenr&)r�possibility_str�suggestrrrr �s��zNoSuchOption.format_messagerB)r(r)r*r+rr-r.�Sequencerr r0rrrrrR�s"	������rRc	s<eZdZdZ	d
dededejdddf�fdd	�
Z�ZS)�BadOptionUsageaRaised if an option is generally supplied but the use of the option
    was incorrect.  This is for instance raised if the number of arguments
    for an option is not correct.

    .. versionadded:: 4.0

    :param option_name: the name of the option being used incorrectly.
    NrSrr3rr
cst��||�||_dSr)rrrS)rrSrr3rrrr�s
zBadOptionUsage.__init__r)	r(r)r*r+rr-r.rr0rrrrr[�s
�����r[c@�eZdZdZdS)�BadArgumentUsagez�Raised if an argument is generally supplied but the use of the argument
    was incorrect.  This is for instance raised if the number of values
    for an argument is not correct.

    .. versionadded:: 6.0
    N�r(r)r*r+rrrrr]��r]csDeZdZdZd
dedejeddf�fdd�
Zdefdd	�Z�Z	S)�	FileErrorz"Raised if a file cannot be opened.N�filenamer>r
cs2|durtd�}t��|�t�|�|_||_dS)Nz
unknown error)r%rr�os�fsdecode�ui_filenamera)rrar>rrrrs

zFileError.__init__cCstd�j|j|jd�S)Nz+Could not open file {filename!r}: {message})rar)r%r&rdrrrrrr s�zFileError.format_messagerrCrrrrr`s"r`c@r\)�Abortz=An internal signalling exception that signals Click to abort.Nr^rrrrrer_rec@s(eZdZdZdZd	deddfdd�ZdS)
�Exitz�An exception that indicates that the application should exit with some
    status code.

    :param code: the status code to exit with.
    �r,r�coder
NcCs
||_dSrrg)rrhrrrrs
z
Exit.__init__)r)r(r)r*r+�	__slots__�intrrrrrrfsrf)rb�typingr-rr%r�_compatr�utilsr�
TYPE_CHECKING�corerrr.�UnionrZrr�	Exceptionrr1r?rDrRr[r]r`�RuntimeErrorrerfrrrr�<module>s0�
�	'*E"	

Spamworldpro Mini