Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/click/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/click/__pycache__/exceptions.cpython-312.pyc

�

'ٜg�%����ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZejrdd	l
mZdd
l
mZddl
mZdej"ej$ej&eefd
ej"efd�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�d e�Z Gd!�d"e�Z!y)#�N)�gettext)�ngettext�)�get_text_stderr)�resolve_color_default)�echo)�format_filename)�Command)�Context)�	Parameter�
param_hint�returnc�Z�|�(t|t�sdjd�|D��S|S)Nz / c3�2K�|]}t|����y�w�N)�repr)�.0�xs  �;/usr/local/lib/python3.12/site-packages/click/exceptions.py�	<genexpr>z$_join_param_hints.<locals>.<genexpr>s����6�:�a�$�q�'�:�s�)�
isinstance�str�join)r
s r�_join_param_hintsrs.����j��S�&A��z�z�6�:�6�6�6���c���eZdZdZdZdeddf�fd�Zdefd�Zdefd�Zdd	e	je	je	jddfd
�Z
�xZS)�ClickExceptionz8An exception that Click can handle and show to the user.r�messagerNc�P��t�|�|�t�|_||_yr)�super�__init__r�
show_colorr)�selfr�	__class__s  �rr!zClickException.__init__s$���
����!�-B�,C�����rc��|jSr�r�r#s r�format_messagezClickException.format_message&����|�|�rc��|jSrr&r's r�__str__zClickException.__str__)r)r�filec��|�
t�}ttd�j|j	���||j
��y)N�Error: {message}r&�r,�color)rr�_�formatr(r")r#r,s  r�showzClickException.show,sA���<�"�$�D��
� �!�(�(��1D�1D�1F�(�G���/�/�	
rr)�__name__�
__module__�__qualname__�__doc__�	exit_coderr!r(r+�t�Optional�IO�Anyr3�
__classcell__�r$s@rrrs`���B��I������������
����A�D�D����K�0�
�D�
rrc���eZdZdZdZddedejdddf�fd�
Zdd	ejejejddfd
�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�ctxrrc���t�|�|�||_|jr|jj|_yd|_yr)r r!rB�command�cmd)r#rrBr$s   �rr!zUsageError.__init__Bs4���
����!����<@�H�H����(8�(8���$��rr,c�6�|�
t�}d}d}|j�{|jjj|j��Lt	d�j|jj|jjd��}|�d�}|j�A|jj}t|jj��d|��||��tt	d�j|j���||��y)	N�z"Try '{command} {option}' for help.r)rD�option�
r/r.r&)rrBrD�get_help_optionr1r2�command_path�help_option_namesr0r�	get_usager()r#r,r0�hints    rr3zUsageError.showGs����<�"�$�D������H�H� ���� � �0�0����:�F��9�:�A�A����-�-�d�h�h�6P�6P�QR�6S�B��D��V�2�;�D��8�8���H�H�N�N�E��D�H�H�&�&�(�)��D�6�2��U�K��
� �!�(�(��1D�1D�1F�(�G���	
rr)
r4r5r6r7r8rr9r:r!r;r<r3r=r>s@rr@r@7s^�����I�O��O�!�*�*�Y�*?�O�4�O�

����A�D�D����K�0�
�D�
rr@c���eZdZdZ			ddedejddejddejed	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.
    NrrBr�paramrr
rc�B��t�|�||�||_||_yr)r r!rQr
)r#rrBrQr
r$s     �rr!zBadParameter.__init__ps"���	����#�&���
�$��rc�@�|j�
|j}nW|j�&|jj|j�}n%t	d�j|j��St	d�jt|�|j��S)NzInvalid value: {message}r&z)Invalid value for {param_hint}: {message})r
r)r
rQ�get_error_hintrBr1r2rr)r#r
s  rr(zBadParameter.format_message{s����?�?�&����J�
�Z�Z�
#����2�2�4�8�8�<�J��/�0�7�7����7�M�M��<�=�D�D�(��4�d�l�l�E�
�	
r�NNN�
r4r5r6r7rr9r:r!r(r=r>s@rrPrP^sn����(&*�)-�&*�	%��	%��Z�Z�	�
"�	%��z�z�+�&�		%�
�J�J�s�O�	%�
�
	%�

��

rrPc
����eZdZdZ					ddej
edej
ddej
ddej
ed	ej
ed
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'``.
    NrrBrrQrr
�
param_typerc�@��t�|�|xsd|||�||_y)NrG)r r!rY)r#rrBrQr
rYr$s      �rr!zMissingParameter.__init__�s#���	�����B��U�J�?�$��rc��|j�
|j}n4|j�&|jj|j�}nd}t	|�}|rd|��nd}|j
}|�"|j�|jj}|j}|j�>|jjj|j�}|r
|r	|d|��z
}n|}|rd|��nd}|dk(rtd�}n=|dk(rtd�}n,|dk(rtd	�}ntd
�j|��}|�|�d|��S)
N� rGz. �argumentzMissing argumentrHzMissing option�	parameterzMissing parameterzMissing {param_type})rY�.)r
rQrTrBrrY�param_type_namer�type�get_missing_messager1r2)r#r
rY�msg�	msg_extra�missings      rr(zMissingParameter.format_message�s@���?�?�&�*.�/�/�J�
�Z�Z�
#����2�2�4�8�8�<�J��J�&�z�2�
�)3�q���%��
��_�_�
���$�*�*�"8����3�3�J��l�l���:�:�!��
�
���;�;�D�J�J�G�I����R�	�{�+�+�C�#�C���#��i�B����#��*�+�G�
�8�
#��(�)�G�
�;�
&��+�,�G��.�/�6�6�*�6�M�G���:�,�a��u�-�-rc��|js?|jr|jjnd}td�j	|��S|jS)NzMissing parameter: {param_name})�
param_name)rrQ�namer1r2)r#rgs  rr+zMissingParameter.__str__�sB���|�|�,0�J�J������D�J��6�7�>�>�*�>�U�U��<�<�r)NNNNN)r4r5r6r7r9r:rr!r(r+r=r>s@rrXrX�s����	�$(�%)�)-�&*�&*�
	%����C��	%��Z�Z�	�
"�	%��z�z�+�&�		%�
�J�J�s�O�	%��J�J�s�O�
	%�
�	%�$.��$.�L �� rrXc���eZdZdZ			ddedejedejejedejdddf
�fd	�
Zdefd
�Z	�xZ
S)�NoSuchOptionzfRaised if click attempted to handle an option that does not
    exist.

    .. versionadded:: 4.0
    N�option_namer�
possibilitiesrBrrc�|��|�td�j|��}t�|�
||�||_||_y)NzNo such option: {name})rh)r1r2r r!rkrl)r#rkrrlrBr$s     �rr!zNoSuchOption.__init__�sB����?��0�1�8�8�k�8�J�G�
����#�&�&���*��rc��|js|jSdjt|j��}t	ddt|j��j
||��}|j�d|��S)Nz, zDid you mean {possibility}?z#(Possible options: {possibilities}))�possibilityrlr\)rlrr�sortedr�lenr2)r#�possibility_str�suggests   rr(zNoSuchOption.format_message�sv���!�!��<�<���)�)�F�4�+=�+=�$>�?���)�1���"�"�#�
��&�_�O�&�
L�		�
�,�,��q��	�*�*rrU)r4r5r6r7rr9r:�Sequencer!r(r=r>s@rrjrj�sv����$(�59�%)�+��+����C��+��z�z�!�*�*�S�/�2�	+�
�Z�Z�	�
"�+�
�
+�
+��
+rrjc	�R��eZdZdZ	d	dededejdddf�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.
    NrkrrBrrc�4��t�|�||�||_yr)r r!rk)r#rkrrBr$s    �rr!zBadOptionUsage.__init__�s���	����#�&�&��rr)	r4r5r6r7rr9r:r!r=r>s@rrvrv�sB����LP�'��'�),�'�34�:�:�i�3H�'�	
�'�'rrvc��eZdZdZy)�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�r4r5r6r7�rrryrys��rryc�X��eZdZdZddedejeddf�fd�
Zdefd�Z�xZ	S)	�	FileErrorz"Raised if a file cannot be opened.N�filenamerNrc�l��|�td�}t�|�	|�t|�|_||_y)Nz
unknown error)r1r r!r	�ui_filenamer~)r#r~rNr$s   �rr!zFileError.__init__s3����<��_�%�D�
����� /�� 9��� ��
rc�b�td�j|j|j��S)Nz+Could not open file {filename!r}: {message})r~r)r1r2r�rr's rr(zFileError.format_messages0���>�?�F�F��%�%�t�|�|�G�
�	
rrrVr>s@rr}r}	s4���,�!��!�A�J�J�s�O�!�t�!�
��
rr}c��eZdZdZy)�Abortz=An internal signalling exception that signals Click to abort.Nrzr{rrr�r�s��Grr�c�&�eZdZdZdZddeddfd�Zy)�Exitz�An exception that indicates that the application should exit with some
    status code.

    :param code: the status code to exit with.
    �r8�coderNc��||_yrr�)r#r�s  rr!z
Exit.__init__'s	��"��r)r)r4r5r6r7�	__slots__�intr!r{rrr�r�s!����I�#�S�#��#rr�)"�typingr9rr1r�_compatr�globalsr�utilsrr	�
TYPE_CHECKING�corer
rrr:�Unionrtrr�	Exceptionrr@rPrXrjrvryr}�RuntimeErrorr�r�r{rr�<module>r�s���� ��$�*��"��?�?������
�
�1�7�7�1�:�:�c�?�C�#7�8�9���Z�Z��_��
�Y�
�<$
��$
�N'
�:�'
�TB �|�B �J+�:�+�D'�Z�'�"�z��
��
�"H�L�H�
#�<�
#r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists