Your IP : 3.149.29.190


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/click/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/click/__pycache__/exceptions.cpython-311.pyc

�

Q�Dg9$���ddlZddlmZddlmZddlmZddlmZddlm	Z	ej
rddlmZdd	lm
Z
dd
lmZdejejejeefdejefd
�ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd �d!e��ZdS)"�N)�gettext)�ngettext�)�get_text_stderr)�echo)�format_filename)�Command)�Context)�	Parameter�
param_hint�returnc�r�|�4t|t��sd�d�|D����S|S)Nz / c3�4K�|]}t|��V��dS�N)�repr)�.0�xs  �p/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/click/exceptions.py�	<genexpr>z$_join_param_hints.<locals>.<genexpr>s(����6�6�a�$�q�'�'�6�6�6�6�6�6�)�
isinstance�str�join)rs r�_join_param_hintsrs@����j��S�&A�&A���z�z�6�6�:�6�6�6�6�6�6��rc���eZdZdZdZdeddf�fd�Zdefd�Zdefd�Zdd	e	j
e	je	jddfd
�Z
�xZS)�ClickExceptionz8An exception that Click can handle and show to the user.r�messager
Nc�X��t���|��||_dSr)�super�__init__r)�selfr�	__class__s  �rr zClickException.__init__s&���
������!�!�!�����rc��|jSr�r�r!s r�format_messagezClickException.format_message"�
���|�rc��|jSrr$r%s r�__str__zClickException.__str__%r'r�filec��|�t��}ttd���|������|���dS)N�Error: {message}r$)r*)rr�_�formatr&)r!r*s  r�showzClickException.show(sQ���<�"�$�$�D��Q�!�
"�
"�
)�
)�$�2E�2E�2G�2G�
)�
H�
H�t�T�T�T�T�T�Trr)�__name__�
__module__�__qualname__�__doc__�	exit_coderr r&r)�t�Optional�IO�Anyr/�
__classcell__�r"s@rrrs��������B�B��I�����������������������U�U���A�D���K�0�U�D�U�U�U�U�U�U�U�Urrc���eZdZdZdZddedejdddf�fd�
Zdd	ejej	ej
ddfd
�Z�xZ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.
    �Nr�ctxr
r
c���t���|��||_|jr|jjnd|_dSr)rr r>�command�cmd)r!rr>r"s   �rr zUsageError.__init__:s>���
������!�!�!����>B�h�*P�$�(�*:�*:�D����rr*c��|�t��}d}d}|j�g|jj�|j���Ct	d���|jj|jjd���}|�d�}|j�:|jj}t|j�
���d|��||���tt	d���|������||���dS)	N�z"Try '{command} {option}' for help.r)r@�option�
)r*�colorr,r$)rr>r@�get_help_optionr-r.�command_path�help_option_namesrFr�	get_usager&)r!r*rF�hints    rr/zUsageError.show?s���<�"�$�$�D������H� ��� �0�0���:�:�F��9�:�:�A�A���-�d�h�6P�QR�6S�B���D��;�;�;�D��8���H�N�E��D�H�&�&�(�(�2�2�D�2�2��U�K�K�K�K��
� �!�!�(�(��1D�1D�1F�1F�(�G�G���	
�	
�	
�	
�	
�	
rr)
r0r1r2r3r4rr5r6r r7r8r/r9r:s@rr<r</s�����������I�Q�Q��Q�!�*�Y�*?�Q�4�Q�Q�Q�Q�Q�Q�

�
���A�D���K�0�
�D�
�
�
�
�
�
�
�
rr<c���eZdZdZ			ddedejddejddejed	df
�fd
�
Zd	efd�Z�xZ	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
c�h��t���||��||_||_dSr)rr rNr)r!rr>rNrr"s     �rr zBadParameter.__init__hs1���	������#�&�&�&���
�$����rc�*�|j�|j}nO|j� |j�|j��}n(t	d���|j���St	d���t|��|j���S)NzInvalid value: {message}r$z)Invalid value for {param_hint}: {message})rr)rrN�get_error_hintr>r-r.rr)r!rs  rr&zBadParameter.format_messagess����?�&���J�J�
�Z�
#���2�2�4�8�<�<�J�J��/�0�0�7�7���7�M�M�M��<�=�=�D�D�(��4�4�d�l�E�
�
�	
r�NNN�
r0r1r2r3rr5r6r r&r9r:s@rrMrMVs����������(&*�)-�&*�	%�	%��	%��Z�	�
"�	%��z�+�&�		%�
�J�s�O�	%�
�
	%�	%�	%�	%�	%�	%�

��

�

�

�

�

�

�

�

rrMc
����eZdZdZ					ddejedejddejddejed	ejed
df�fd�
Zd
efd�Zd
efd
�Z	�xZ
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'``.
    Nrr>r
rNrr�
param_typer
c�b��t���|pd|||��||_dS)NrC)rr rV)r!rr>rNrrVr"s      �rr zMissingParameter.__init__�s2���	�������B��U�J�?�?�?�$����rc�J�|j�|j}n)|j� |j�|j��}nd}t	|��}|rd|��nd}|j}|�|j�|jj}|j}|j�3|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>rrV�param_type_namer�type�get_missing_messager-r.)r!rrV�msg�	msg_extra�missings      rr&zMissingParameter.format_message�sm���?�&�*.�/�J�J�
�Z�
#���2�2�4�8�<�<�J�J��J�&�z�2�2�
�)3�;�%��%�%�%��
��_�
���$�*�"8���3�J��l���:�!��
��;�;�D�J�G�G�I��
$��$��+�	�+�+�+�C�C�#�C��&�i�#�i�i�i�B����#�#��*�+�+�G�G�
�8�
#�
#��(�)�)�G�G�
�;�
&�
&��+�,�,�G�G��.�/�/�6�6�*�6�M�M�G��-�:�-�-��-�-�-rc��|js8|jr|jjnd}td���|���S|jS)NzMissing parameter: {param_name})�
param_name)rrN�namer-r.)r!rds  rr)zMissingParameter.__str__�sH���|�	 �,0�J�@�����D�J��6�7�7�>�>�*�>�U�U�U��<�r)NNNNN)r0r1r2r3r5r6rr r&r)r9r:s@rrUrU�s��������	�	�$(�%)�)-�&*�&*�
	%�	%���C��	%��Z�	�
"�	%��z�+�&�		%�
�J�s�O�	%��J�s�O�
	%�
�	%�	%�	%�	%�	%�	%�$.��$.�$.�$.�$.�L �� � � � � � � � rrUc���eZdZdZ			ddedejedejejedejdddf
�fd	�
Zdefd
�Z	�xZ
S)�NoSuchOptionzfRaised if click attempted to handle an option that does not
    exist.

    .. versionadded:: 4.0
    N�option_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����?��0�1�1�8�8�k�8�J�J�G�
������#�&�&�&�&���*����rc���|js|jSd�t|j����}t	ddt|j�����||���}|j�d|��S)Nz, zDid you mean {possibility}?z#(Possible options: {possibilities}))�possibilityrirY)rirr�sortedr�lenr.)r!�possibility_str�suggests   rr&zNoSuchOption.format_message�s����!�	 ��<���)�)�F�4�+=�$>�$>�?�?���)�1���"�#�#�
�
��&�_�O�&�
L�
L�		�
�,�*�*��*�*�*rrR)r0r1r2r3rr5r6�Sequencer r&r9r:s@rrgrg�s����������$(�59�%)�+�+��+���C��+��z�!�*�S�/�2�	+�
�Z�	�
"�+�
�
+�+�+�+�+�+�
+��
+�
+�
+�
+�
+�
+�
+�
+rrgc	�N��eZdZdZ	d	dededejdddf�fd�
Z�xZS)
�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
c�Z��t���||��||_dSr)rr rh)r!rhrr>r"s    �rr zBadOptionUsage.__init__�s-���	������#�&�&�&�&����rr)	r0r1r2r3rr5r6r r9r:s@rrsrs�sz���������LP�'�'��'�),�'�34�:�i�3H�'�	
�'�'�'�'�'�'�'�'�'�'rrsc��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�r0r1r2r3�rrrvrv�s���������rrvc�T��eZdZdZddedejeddf�fd�
Zdefd�Z�xZ	S)	�	FileErrorz"Raised if a file cannot be opened.N�filenamerKr
c���|�td��}t���|��t|��|_||_dS)Nz
unknown error)r-rr r�ui_filenamer{)r!r{rKr"s   �rr zFileError.__init__sH����<��_�%�%�D�
��������� /�� 9� 9��� ��
�
�
rc�^�td���|j|j���S)Nz+Could not open file {filename!r}: {message})r{r)r-r.r}rr%s rr&zFileError.format_messages3���>�?�?�F�F��%�t�|�G�
�
�	
rrrSr:s@rrzrzs~�������,�,�!�!��!�A�J�s�O�!�t�!�!�!�!�!�!�
��
�
�
�
�
�
�
�
rrzc��eZdZdZdS)�Abortz=An internal signalling exception that signals Click to abort.Nrwrxrrr�r�s������G�G�G�Grr�c�(�eZdZdZdZddeddfd�ZdS)	�Exitz�An exception that indicates that the application should exit with some
    status code.

    :param code: the status code to exit with.
    �r4r�coder
Nc��||_dSrr�)r!r�s  rr z
Exit.__init__s
��"����r)r)r0r1r2r3�	__slots__�intr rxrrr�r�sL���������I�#�#�S�#��#�#�#�#�#�#rr�) �typingr5rr-r�_compatr�utilsrr�
TYPE_CHECKING�corer	r
rr6�Unionrqrr�	Exceptionrr<rMrUrgrsrvrz�RuntimeErrorr�r�rxrr�<module>r�s������� � � � � � �������$�$�$�$�$�$�������"�"�"�"�"�"��?� ���������������������
�1�7�1�:�c�?�C�#7�8�9���Z��_�����U�U�U�U�U�Y�U�U�U�.$
�$
�$
�$
�$
��$
�$
�$
�N'
�'
�'
�'
�'
�:�'
�'
�'
�TB �B �B �B �B �|�B �B �B �J+�+�+�+�+�:�+�+�+�D'�'�'�'�'�Z�'�'�'�"�����z����
�
�
�
�
��
�
�
�"H�H�H�H�H�L�H�H�H�
#�
#�
#�
#�
#�<�
#�
#�
#�
#�
#r

?>