Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/click/__pycache__/exceptions.cpython-311.pyc



]j9$ddlZddlmZddlmZddlmZddlmZddlm	Z	ej
rddlmZdd	lm
Z
dd
lmZdejejejeefdejefd
ZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGd d!eZdS)"N)gettext)ngettext)get_text_stderr)echo)format_filename)Command)Context)	Parameter
param_hintreturncr|4t|tsdd|DS|S)Nz / c34K|]}t|VdSN)repr).0xs  p/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/click/exceptions.py	<genexpr>z$_join_param_hints.<locals>.<genexpr>s(66a$q''666666)
isinstancestrjoin)rs r_join_param_hintsrs@jS&A&Azz66:666666rceZdZdZdZdeddffdZdefdZdefdZdd	e	j
e	je	jddfd
Z
xZS)ClickExceptionz8An exception that Click can handle and show to the user.rmessager
NcXt|||_dSr)super__init__r)selfr	__class__s  rr zClickException.__init__s&
!!!rc|jSrrr!s rformat_messagezClickException.format_message"
|rc|jSrr$r%s r__str__zClickException.__str__%r'rfilec|t}ttd||dS)NError: {message}r$)r*)rr_formatr&)r!r*s  rshowzClickException.show(sQ<"$$DQ!
"
"
)
)$2E2E2G2G
)
H
HtTTTTTTrr)__name__
__module____qualname____doc__	exit_coderr r&r)tOptionalIOAnyr/
__classcell__r"s@rrrsBBIUUADK0UDUUUUUUUUrrceZdZdZdZddedejdddffd
Zdd	ejej	ej
ddfd
ZxZS)
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.
    Nrctxr
r
ct|||_|jr|jjnd|_dSr)rr r>commandcmd)r!rr>r"s   rr zUsageError.__init__:s>
!!!>Bh*P$(*:*:Drr*c|t}d}d}|jg|jj|jCt	d|jj|jjd}|d}|j:|jj}t|j
d|||tt	d|||dS)	Nz"Try '{command} {option}' for help.r)r@option
)r*colorr,r$)rr>r@get_help_optionr-r.command_pathhelp_option_namesrFr	get_usager&)r!r*rFhints    rr/zUsageError.show?s<"$$DH  00::F9::AA-dh6PQR6SBD;;;D8HNEDH&&((22D22UKKKK
 !!((1D1D1F1F(GG	
	
	
	
	
	
rr)
r0r1r2r3r4rr5r6r r7r8r/r9r:s@rr<r</sIQQQ!*Y*?Q4QQQQQQ


ADK0
D







rr<ceZdZdZ			ddedejddejddejed	df
fd

Zd	efdZxZ	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.
    Nrr>r
paramrrr
cht||||_||_dSr)rr rNr)r!rr>rNrr"s     rr zBadParameter.__init__hs1	#&&&
$rc*|j|j}nO|j |j|j}n(t	d|jSt	dt||jS)NzInvalid value: {message}r$z)Invalid value for {param_hint}: {message})rr)rrNget_error_hintr>r-r.rr)r!rs  rr&zBadParameter.format_messagess?&JJ
Z
#2248<<JJ/00777MMM<==DD(44dlE

	
rNNN
r0r1r2r3rr5r6r r&r9r:s@rrMrMVs(&*)-&*	%	%	%Z	
"	%z+&		%
JsO	%

	%	%	%	%	%	%

















rrMc
eZdZdZ					ddejedejddejddejed	ejed
dffd
Zd
efdZd
efd
Z	xZ
S)MissingParameteraRaised 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'``.
    Nrr>r
rNrr
param_typer
cbt|pd|||||_dS)NrC)rr rV)r!rr>rNrrVr"s      rr zMissingParameter.__init__s2	BUJ???$rcJ|j|j}n)|j |j|j}nd}t	|}|rd|nd}|j}||j|jj}|j}|j3|jj	|j}|r
|r	|d|z
}n|}|rd|nd}|dkrtd}nO|dkrtd}n9|dkrtd	}n#td
|}||d|S)
N rCz. argumentzMissing argumentrDzMissing option	parameterzMissing parameterzMissing {param_type})rV.)rrNrQr>rrVparam_type_namertypeget_missing_messager-r.)r!rrVmsg	msg_extramissings      rr&zMissingParameter.format_messagesm?&*./JJ
Z
#2248<<JJJ&z22
)3;%%%%
_
$*"83Jl:!
;;DJGGI
$$+	+++CC#C&i#iiiB##*++GG
8
#
#())GG
;
&
&+,,GG.//66*6MMG-:-----rc|js8|jr|jjnd}td|S|jS)NzMissing parameter: {param_name})
param_name)rrNnamer-r.)r!rds  rr)zMissingParameter.__str__sH|	 ,0J@DJ677>>*>UUU<r)NNNNN)r0r1r2r3r5r6rr r&r)r9r:s@rrUrUs		$(%))-&*&*
	%	%C	%Z	
"	%z+&		%
JsO	%JsO
	%
	%	%	%	%	%	%$.$.$.$.$.L         rrUceZdZdZ			ddedejedejejedejdddf
fd	
Zdefd
Z	xZ
S)NoSuchOptionzfRaised if click attempted to handle an option that does not
    exist.

    .. versionadded:: 4.0
    Noption_namer
possibilitiesr>r
r
c|#td|}t||||_||_dS)NzNo such option: {name})re)r-r.rr rhri)r!rhrrir>r"s     rr zNoSuchOption.__init__sY?01188k8JJG
#&&&&*rc|js|jSdt|j}t	ddt|j||}|jd|S)Nz, zDid you mean {possibility}?z#(Possible options: {possibilities}))possibilityrirY)rirrsortedrlenr.)r!possibility_strsuggests   rr&zNoSuchOption.format_messages!	 <))F4+=$>$>??)1"##

&_O&
L
L		
,*****rrR)r0r1r2r3rr5r6Sequencer r&r9r:s@rrgrgs$(59%)+++C+z!*S/2	+
Z	
"+

++++++
+
+
+
+
+
+
+
+
+rrgc	NeZdZdZ	d	dededejdddffd
ZxZS)
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.
    Nrhrr>r
r
cZt||||_dSr)rr rh)r!rhrr>r"s    rr zBadOptionUsage.__init__s-	#&&&&rr)	r0r1r2r3rr5r6r r9r:s@rrsrsszLP'''),'34:i3H'	
''''''''''rrsceZdZdZdS)BadArgumentUsagezRaised 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
    Nr0r1r2r3rrrvrvsrrvcTeZdZdZddedejeddffd
ZdefdZxZ	S)		FileErrorz"Raised if a file cannot be opened.NfilenamerKr
c|td}t|t||_||_dS)Nz
unknown error)r-rr rui_filenamer{)r!r{rKr"s   rr zFileError.__init__sH<_%%D
 / 9 9 


rc^td|j|jS)Nz+Could not open file {filename!r}: {message})r{r)r-r.r}rr%s rr&zFileError.format_messages3>??FF%t|G

	
rrrSr:s@rrzrzs~,,!!!AJsO!t!!!!!!








rrzceZdZdZdS)Abortz=An internal signalling exception that signals Click to abort.NrwrxrrrrsGGGGrrc(eZdZdZdZddeddfdZdS)	ExitzAn exception that indicates that the application should exit with some
    status code.

    :param code: the status code to exit with.
    r4rcoder
Nc||_dSrr)r!rs  rr z
Exit.__init__s
"r)r)r0r1r2r3	__slots__intr rxrrrrsLI##S#######rr) typingr5rr-r_compatrutilsrr
TYPE_CHECKINGcorer	r
rr6Unionrqrr	Exceptionrr<rMrUrgrsrvrzRuntimeErrorrrrxrr<module>rs      $$$$$$""""""? 
171:c?C#789Z_UUUUUYUUU.$
$
$
$
$
$
$
$
N'
'
'
'
'
:'
'
'
TB B B B B |B B B J+++++:+++D'''''Z'''"z







"HHHHHLHHH
#
#
#
#
#<
#
#
#
#
#r
Back to Directory File Manager