← back to Atmos Game

assets/gen/.venv/lib/python3.12/site-packages/click/__pycache__/exceptions.cpython-312.pyc

127 lines

�

c�bjV.����ddlmZddlmZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZej"rdd
lmZddlmZddlmZd'd
�Zd(d�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Z Gd�d e�Z!Gd!�d"e�Z"Gd#�d$e#�Z$Gd%�d&e#�Z%y))�)�annotationsN)�gettext)�ngettext�)�get_text_stderr)�resolve_color_default)�echo)�format_filename)�Command)�Context)�	Parameterc�Z�|�(t|t�sdjd�|D��S|S)Nz / c3�2K�|]}t|����y�w�N��repr)�.0�xs  �g/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/click/exceptions.py�	<genexpr>z$_join_param_hints.<locals>.<genexpr>s����6�:�a�$�q�'�:���)�
isinstance�str�join)�
param_hints r�_join_param_hintsrs,����j��S�&A��z�z�6�:�6�6�6���c��djd�t|�D��}tddt|��j	||��S)Nz, c3�2K�|]}t|����y�wrr)r�ps  rrz(_format_possibilities.<locals>.<genexpr>s����G�1F�A��Q��1F�rzDid you mean {possibility}?z'(Did you mean one of: {possibilities}?))�possibility�
possibilities)r�sortedr�len�format)r"�possibility_strs  r�_format_possibilitiesr'sG���i�i�G��
�1F�G�G�O��%�1��M���
�f���f�H�	Irc�b��eZdZUdZdZded<ded<ded<d
�fd	�Zdd
�Zdd�Zddd�Z	�xZ
S)�ClickExceptionz8An exception that Click can handle and show to the user.r�t.ClassVar[int]�	exit_codezt.Final[bool | None]�
show_color�t.Final[str]�messagec�P��t�|�|�t�|_||_yr)�super�__init__rr,r.)�selfr.�	__class__s  �rr1zClickException.__init__,s#���
����!�0�1�����rc��|jSr�r.�r2s r�format_messagezClickException.format_message3����|�|�rc��|jSrr5r6s r�__str__zClickException.__str__6r8rc��|�
t�}ttd�j|j	���||j
��y)N�Error: {message}r5��file�color)rr	�_r%r7r,�r2r>s  r�showzClickException.show9sA���<�"�$�D��
� �!�(�(��1D�1D�1F�(�G���/�/�	
r)r.r�return�None�rCrr�r>zt.IO[t.Any] | NonerCrD)�__name__�
__module__�__qualname__�__doc__r+�__annotations__r1r7r:rB�
__classcell__�r3s@rr)r)#s7���B�"#�I��"�$�$�
�����
�
rr)c�T��eZdZUdZdZded<ded<ded<dd�fd	�
Zdd
d
�Z�xZS)�
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.
    �r*r+�Context | None�ctxzt.Final[Command | None]�cmdc���t�|�|�||_|jr|jj|_yd|_yr)r0r1rR�commandrS)r2r.rRr3s   �rr1zUsageError.__init__Rs4���
����!����'+�x�x�4�8�8�#�#���T��rc��|�
t�}d}d}|j��|jjj|j��s|jjj	|j�}td�j
|jjt|t����}|�d�}|j�A|jj}t|jj��d|��||��ttd�j
|j���||��y)	N�z"Try '{command} {option}' for help.)�key)rU�option�
r=r<r5)rrRrU�get_help_option�get_help_option_namesr@r%�command_path�maxr$r?r	�	get_usager7)r2r>r?�hint�
help_namess     rrBzUsageError.showWs���<�"�$�D������H�H� ���� � �0�0����:�F����)�)�?�?����I�J��9�:�A�A����-�-��:�3�/�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)r.rrRrQrCrDrF)	rGrHrIrJr+rKr1rBrLrMs@rrOrODs/����"#�I��"�	��	 � �:�

�
rrOc�\��eZdZUdZded<ded<			d									d	�fd�
Zd
d�Z�xZS)�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.
    �Parameter | None�param�cabc.Sequence[str] | str | Nonerc�B��t�|�||�||_||_yr)r0r1rer)r2r.rRrerr3s     �rr1zBadParameter.__init__�s"���	����#�&���
�$��rc�@�|j�
|j}nW|j�&|jj|j�}n%t	d�j|j��St	d�jt|�|j��S)NzInvalid value: {message}r5z)Invalid value for {param_hint}: {message})rr.)rre�get_error_hintrRr@r%r.r)r2rs  rr7zBadParameter.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)
r.rrRrQrerdrrfrCrDrE�rGrHrIrJrKr1r7rLrMs@rrcrcrs[����"��/�/�
#�"&�6:�	%��	%��	%� �		%�
4�	%�
�
	%�

rrcc�b��eZdZUdZded<					d											d�fd�
Zd	d�Zd	d�Z�xZS)
�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'``.
    zt.Final[str | None]�
param_typec�@��t�|�|xsd|||�||_y)NrW)r0r1rn)r2r.rRrerrnr3s      �rr1zMissingParameter.__init__�s#���	�����B��U�J�?�$��rc��|j�
|j}n4|j�&|jj|j�}nd}t	|�}|rd|��nd}|j
}|�"|j�|jj}|j}|j�J|jjj|j|j��}|r
|r	|d|��z
}n|}|rd|��nd}|dk(rtd�}n=|dk(rtd�}n,|d	k(rtd
�}ntd�j|��}|�|�d
|��S)N� rW)rerRz. �argumentzMissing argumentrYzMissing option�	parameterzMissing parameterzMissing {param_type})rn�.)rrerirRrrn�param_type_namer.�type�get_missing_messager@r%)r2rrn�msg�	msg_extra�missings      rr7zMissingParameter.format_message�sP���?�?�&�:>�/�/�J�
�Z�Z�
#����2�2�4�8�8�<�J��J�&�z�2�
�)3�q���%��
��_�_�
���$�*�*�"8����3�3�J��l�l���:�:�!��
�
���;�;��j�j�d�h�h�<��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)r.re�namer@r%)r2r|s  rr:zMissingParameter.__str__�sB���|�|�,0�J�J������D�J��6�7�>�>�*�>�U�U��<�<�r)NNNNN)r.�
str | NonerRrQrerdrrfrnr~rCrDrE)	rGrHrIrJrKr1r7r:rLrMs@rrmrm�sk���	�$�#�#�"�"&�6:�!%�
	%��	%��	%� �		%�
4�	%��
	%�
�	%�&.�P rrmc�\��eZdZUdZded<ded<			d									d	�fd�
Zd
d�Z�xZS)�NoSuchOptionzbRaised if Click attempted to handle an option that does not exist.

    .. versionadded:: 4.0
    r-�option_name�t.Final[list[str] | None]r"c���|�td�j|��}t�|�
||�||_|rddlm}|||�}||_yd}||_y)NzNo such option {name!r}.�r}r��get_close_matches)r@r%r0r1r��difflibr�r")r2r�r.r"rRr��possibilities_r3s       �rr1zNoSuchOption.__init__�se����?��2�3�:�:��:�L�G�
����#�&�&����1�.�{�M�J�N�,���"�N�+��rc�z�|js|jS|j�dt|j���S�Nrq�r"r.r'r6s rr7zNoSuchOption.format_message�7���!�!��<�<���,�,��q�!6�t�7I�7I�!J� K�L�Lrrj)
r�rr.r~r"�cabc.Iterable[str] | NonerRrQrCrDrErkrMs@rr�r��s\����
��,�,�
#�37�"�,��,��,�1�	,�
�,�
�
,�*Mrr�c�\��eZdZUdZded<ded<			d									d	�fd�
Zd
d�Z�xZS)�
NoSuchCommandzdRaised if Click attempted to handle a command that does not exist.

    .. versionadded:: 8.4.0
    r-�command_namer�r"c���|�td�j|��}t�|�
||�||_|rddlm}|||�}||_yd}||_y)NzNo such command {name!r}.r�rr�)r@r%r0r1r�r�r�r")r2r�r.r"rRr�r�r3s       �rr1zNoSuchCommand.__init__se����?��3�4�;�;��;�N�G�
����#�&�(����1�.�|�]�K�N�,���"�N�+��rc�z�|js|jS|j�dt|j���Sr�r�r6s rr7zNoSuchCommand.format_message*r�rrj)
r�rr.r~r"r�rRrQrCrDrErkrMs@rr�r�s\����
��,�,�
#�37�"�,��,��,�1�	,�
�,�
�
,�*Mrr�c�B��eZdZUdZded<	d							d�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.
    r-r�c�4��t�|�||�||_yr)r0r1r�)r2r�r.rRr3s    �rr1zBadOptionUsage.__init__<s���	����#�&�&��rr)r�rr.rrRrQrCrD)rGrHrIrJrKr1rLrMs@rr�r�0sA������EI�'��'�),�'�3A�'�	
�'�'rr�c��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�rGrHrIrJ�rrr�r�Cs��rr�c�6��eZdZUded<d�fd�Zddd�Z�xZS)�NoArgsIsHelpErrorrrRc�D��t�|�|j�|��y)N)rR)r0r1�get_help)r2rRr3s  �rr1zNoArgsIsHelpError.__init__Os���
�������S��1rc�f�t|j�|d|jj��y)NT)r>�errr?)r	r7rRr?rAs  rrBzNoArgsIsHelpError.showRs!���T�
 �
 �
"��4�t�x�x�~�~�Nr)rRrrCrDrrF)rGrHrIrKr1rBrLrMs@rr�r�Ls���	�L�2�O�Orr�c�D��eZdZUdZded<ded<dd�fd�
Zd	d�Z�xZS)
�	FileErrorz"Raised if a file cannot be opened.r-�ui_filename�filenamec�l��|�td�}t�|�	|�t|�|_||_y)Nz
unknown error)r@r0r1r
r�r�)r2r�r`r3s   �rr1zFileError.__init__\s3����<��_�%�D�
�����*�8�4��� ��
rc�b�td�j|j|j��S)Nz+Could not open file {filename!r}: {message})r�r.)r@r%r�r.r6s rr7zFileError.format_messageds0���>�?�F�F��%�%�t�|�|�G�
�	
rr)r�rr`r~rCrDrErkrMs@rr�r�Vs���,�����!�
rr�c��eZdZdZy)�Abortz=An internal signalling exception that signals Click to abort.Nr�r�rrr�r�js��Grr�c�*�eZdZUdZdZded<ddd�Zy)	�Exitz�An exception that indicates that the application should exit with some
    status code.

    :param code: the status code to exit with.
    �r+zt.Final[int]r+c��||_yrr�)r2�codes  rr1z
Exit.__init__ys	����rN)r)r��intrCrD)rGrHrIrJ�	__slots__rKr1r�rrr�r�ns����I���rr�)rrfrCr~)r"z	list[str]rCr)&�
__future__r�collections.abc�abc�cabc�typing�trr@r�_compatr�globalsr�utilsr	r
�
TYPE_CHECKING�corerrr
rr'�	Exceptionr)rOrcrmr�r�r�r�r�r��RuntimeErrorr�r�r�rr�<module>r�s���"��� ��$�*��"��?�?�����I�
�Y�
�B+
��+
�\*
�:�*
�ZF �|�F �R!M�:�!M�H!M�J�!M�H'�Z�'�&�z��O�
�O�
��
�(H�L�H��<�r