Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
exceptions.cpython-313.pyc125 linesDownload Raw Back to __pycache__
1�

2�j�&���SSKJr SSKJr SSKrSSKJr SSKJ	r	 SSK3Jr SSKJ
r
 SSKJr SS	KJr \R"(aSS4KJr SSKJr SSKJr S$S
jr"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r "S S!\!5r""S"S#\!5r#g)%�)�annotationsN)�gettext)�ngettext�)�get_text_stderr)�resolve_color_default)�echo)�format_filename)�Command)�Context)�	Parameterc�f�Ub-[U[5(dSRSU55$U$)Nz / c3�8# �UHn[U5v� M g7f�N)�repr)�.0�xs  �VD:\code\apps\devtools\python\user_packages\Python313\site-packages\click/exceptions.py�	<genexpr>�$_join_param_hints.<locals>.<genexpr>s���6�:�a�$�q�'�'�:�s�)�5isinstance�str�join)�6param_hints r�_join_param_hintsrs/����j��S�&A�&A��z�z�6�:�6�6�6���c�V^�\rSrSrSrSrS	U4SjjrS7SjrS8SjrSSSjjr	Sr9U=r$)
�ClickException�z8An exception that Click can handle and show to the user.rc�N>�[TU]U5 [5UlXlgr)�super�__init__r�10show_color�message)�selfr$�	__class__s  �rr"�ClickException.__init__ s!���
����!�(=�'>����rc��UR$r�r$�r%s r�format_message�ClickException.format_message'����|�|�rc��UR$rr)r*s r�__str__�ClickException.__str__*r-rc��Uc11[5n[[S5RUR	5S9UUR12S9 g)N�Error: {message}r)��file�color)rr	�_�formatr+r#�r%r4s  r�show�ClickException.show-sA���<�"�$�D��
� �!�(�(��1D�1D�1F�(�G���/�/�	13r)r$r#)r$r�return�None�r;rr�r4zt.IO[t.Any] | Noner;r<)�__name__�14__module__�__qualname__�__firstlineno__�__doc__�	exit_coder"r+r/r9�__static_attributes__�
__classcell__�r&s@rrrs&���B��I����15�16rrc�F^�\rSrSrSrSrSSU4SjjjrSS	SjjrSrU=r	$)17�18UsageError�8aAn internal exception that signals a usage error.  This typically19aborts any further handling.20 21:param message: the error message to display.22:param ctx: optionally the context that caused this error.  Click will23            fill in the context automatically in some situations.24�c�>�[TU]U5 X lUR(aURRUlgSUlgr)r!r"�ctx�command�cmd)r%r$rMr&s   �rr"�UsageError.__init__Cs2���
����!���7;�x�x�4�8�8�#3�#3���T��rc�$�Uc25[5nSnSnURbyURRRUR5bI[	S5RURRURRSS9nUS3nURb=URRn[URR5SU3XS9 [[	S5RUR5S9UUS9 g)	N�z"Try '{command} {option}' for help.r)rN�option�26r3r2r))rrMrN�get_help_optionr6r7�command_path�help_option_namesr5r	�	get_usager+)r%r4r5�hints    rr9�UsageError.showHs����<�"�$�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��K��
� �!�(�(��1D�1D�1F�(�G���	27r)rOrMr)r$rrM�Context | Noner;r<r>)28r?r@rArBrCrDr"r9rErFrGs@rrIrI8s%�����I�J�J�2930�31rrIc�V^�\rSrSrSrSSU4SjjjrSSjrSrU=r$)	�BadParameter�_a�An exception that formats out a standardized error message for a32bad parameter.  This is useful when thrown from a callback or type as33Click will attach contextual information to it (for instance, which34parameter it is).35 36.. versionadded:: 2.037 38:param param: the parameter object that caused this error.  This can39              be left out, and Click will attach this info itself40              if possible.41:param param_hint: a string that shows up as parameter name.  This42                   can be used as alternative to `param` in cases43                   where custom validation should happen.  If it is44                   a string it's used as such, if it's a list then45                   each item is quoted and separated.46c�<>�[TU]X5 X0lX@lgr)r!r"�paramr)r%r$rMr`rr&s     �rr"�BadParameter.__init__qs���	����&��47�$�rc�8�URb
URnOUURb&URRUR5nO"[	S5RURS9$[	S5R[U5URS9$)NzInvalid value: {message}r)z)Invalid value for {param_hint}: {message})rr$)rr`�get_error_hintrMr6r7r$r)r%rs  rr+�BadParameter.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�48�	49r)r`r�NNN)50r$rrMr[r`�Parameter | Noner�cabc.Sequence[str] | str | Noner;r<r=�	r?r@rArBrCr"r+rErFrGs@rr]r]_sW����(#�"&�6:�	%��	%��	%� �		%�514�	%�52�
	%�	%�5354�5556rr]c�h^�\rSrSrSrSSU4SjjjrS	SjrS	SjrSrU=r	$)57�MissingParameter�a�Raised if click required an option or argument but it was not58provided when invoking the script.59 60.. versionadded:: 4.061 62:param param_type: a string that indicates the type of the parameter.63                   The default is to inherit the parameter type from64                   the given `param`.  Valid values are ``'parameter'``,65                   ``'option'`` or ``'argument'``.66c�F>�[TU]U=(d SX#U5 XPlg)NrR)r!r"�67param_type)r%r$rMr`rrmr&s      �rr"�MissingParameter.__init__�s���	�����B��J�?�$�rc���URb
URnO5URb&URRUR5nOSn[	U5nU(aSU3OSnUR68nUc#URbURRnURnURbQURRRURURS9nU(aU(a	USU3-
nOUnU(aSU3OSnUS:Xa[S5nO<US:Xa[S5nO*US	:Xa[S695nO[S5RUS9nUUS
U3$)N� rR)r`rMz. �argumentzMissing argumentrSzMissing option�	parameterzMissing parameterzMissing {param_type}�rm�.)rr`rcrMrrm�param_type_namer$�type�get_missing_messager6r7)r%rrm�msg�	msg_extra�missings      rr+�MissingParameter.format_message�sP���?�?�&�:>�/�/�J�
�Z�Z�
#����2�2�4�8�8�<�J��J�&�z�2�70�)3�q���%��71��_�_�72���$�*�*�"8����3�3�J��l�l���:�:�!��73�74���;�;��j�j�d�h�h�<��I����R�	�{�+�+�C�#�C���#��i�B����#��*�+�G�
�8�
#��(�)�G�
�;�
&��+�,�G��.�/�6�6�*�6�M�G���:�,�a��u�-�-rc��UR(dAUR(aURROSn[S5R	US9$UR$)NzMissing parameter: {param_name})�75param_name)r$r`�namer6r7)r%r}s  rr/�MissingParameter.__str__�sB���|�|�,0�J�J������D�J��6�7�>�>�*�>�U�U��<�<�rrs)NNNNN)r$�76str | NonerMr[r`rfrrgrmr�r;r<r=)77r?r@rArBrCr"r+r/rErFrGs@rrjrj�sm���	�#�"�"&�6:�!%�
	%��	%��	%� �		%�784�	%��
	%�79�	%�	%�&.�P � rrjc�V^�\rSrSrSrSSU4SjjjrSSjrSrU=r$)	�NoSuchOption��zZRaised if click attempted to handle an option that does not80exist.81 82.. versionadded:: 4.083c�r>�Uc[S5RUS9n[TU]
X$5 XlX0lg)NzNo such option: {name})r~)r6r7r!r"�option_name�
possibilities)r%r�r$r�rMr&s     �rr"�NoSuchOption.__init__�s<����?��0�1�8�8�k�8�J�G�
����&�&��*�rc��UR(dUR$SR[UR55n[	SS[UR55R
XS9nURSU3$)Nz, zDid you mean {possibility}?z#(Possible options: {possibilities}))�possibilityr�rp)r�r$r�sortedr�lenr7)r%�possibility_str�suggests   rr+�NoSuchOption.format_message�st���!�!��<�<���)�)�F�4�+=�+=�$>�?���)�1���"�"�#�84��&�_�&�85L�		�86�,�,��q��	�*�*r)r�r�re)87r�rr$r�r�zcabc.Sequence[str] | NonerMr[r;r<r=rhrGs@rr�r��sW����#�37�"�+��+��+�1�	+�88�+�89�
+�+�90+�91+rr�c�D^�\rSrSrSrSSU4SjjjrSrU=r$)�BadOptionUsage��aRaised if an option is generally supplied but the use of the option92was incorrect.  This is for instance raised if the number of arguments93for an option is not correct.94 95.. versionadded:: 4.096 97:param option_name: the name of the option being used incorrectly.98c�0>�[TU]X#5 Xlgr)r!r"r�)r%r�r$rMr&s    �rr"�BadOptionUsage.__init__�s���	����&�&�r)r�r)r�rr$rrMr[r;r<)r?r@rArBrCr"rErFrGs@rr�r��s9����EI�'��'�),�'�3A�'�	
�'�'rr�c��\rSrSrSrSrg)�BadArgumentUsageiz�Raised if an argument is generally supplied but the use of the argument99was incorrect.  This is for instance raised if the number of values100for an argument is not correct.101 102.. versionadded:: 6.0103�N�r?r@rArBrCrEr�rrr�r�s��rr�c�:^�\rSrSrSU4SjjrSSSjjrSrU=r$)�NoArgsIsHelpErroric�B>�U [TU]UR5US9 g)N)rM)r!r"�get_help)r%rMr&s  �rr"�NoArgsIsHelpError.__init__
s����
�������S��1rc�`�[UR5USURRS9 g)NT)r4�errr5)r	r+rMr5r8s  rr9�NoArgsIsHelpError.shows!���T�
 �
 �
"��4�t�x�x�~�~�Nrr�)rMrr;r<rr>)r?r@rArBr"r9rErFrGs@rr�r�s���2�O�Orr�c�>^�\rSrSrSrSSU4SjjjrSSjrSrU=r$)	�	FileErroriz"Raised if a file cannot be opened.c�l>�Uc[S5n[TU]	U5 [U5UlXlg)Nz
unknown error)r6r!r"r104�ui_filename�filename)r%r�rYr&s   �rr"�FileError.__init__s1����<��_�%�D�
����� /�� 9��� �
rc�\�[S5RURURS9$)Nz+Could not open file {filename!r}: {message})r�r$)r6r7r�r$r*s rr+�FileError.format_message s0���>�?�F�F��%�%�t�|�|�G�105�	106r)r�r�r)r�rrYr�r;r<r=rhrGs@rr�r�s���,�!�!�107�108rr�c��\rSrSrSrSrg)�Aborti&z=An internal signalling exception that signals Click to abort.r�Nr�r�rrr�r�&s��Grr�c�*�\rSrSrSrSrSSSjjrSrg)�Exiti*z�An exception that indicates that the application should exit with some109status code.110 111:param code: the status code to exit with.112�rDc��Xlgrr�)r%�codes  rr"�
Exit.__init__3s��"�rN)r)r��intr;r<)r?r@rArBrC�	__slots__r"rEr�rrr�r�*s����I�#�#rr�)rrgr;r�)$�113__future__r�collections.abc�abc�cabc�typing�trr6r�_compatr�globalsr�utilsr	r114�
TYPE_CHECKING�corerrr
r�	ExceptionrrIr]rjr�r�r�r�r��RuntimeErrorr�r�r�rr�<module>r�s���"��� ��$�*��"��?�?�����115�Y�116�<$117��$118�N'119�:�'120�TD �|�D �N+�:�+�D'�Z�'�"�z��O�121�O�122��123�"H�L�H�124#�<�125#r
codekingpro/portable-devtools · Team Ai