%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/click/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/click/__pycache__/_compat.cpython-312.pyc

�

D�d*I����UddlZddlZddlZddlZddlZddlZddlmZejjd�Zejjd�ZdZ
ejejej gej fed<ej$d�Z		dNdej(dejed	ejed
ededej fd
�Zdedefd�Zdej2ej4defd�ZGd�dej8�ZGd�d�ZdOdej2ej4dedefd�ZdOdej2ej4dedefd�Z dej2ej4dejej(fd�Z!dej2ej4dejej(fd�Z"dej defd�Z#dej dedejedefd�Z$dej dejed	ejedefd�Z%		dNdej2ej4dejed	ejedejej2ej4egefd ejej2ej4gejej(fd
ededej fd!�Z&	dOd"ej2ej4dejed	ejed
edej f
d#�Z'	dOd$ej2ej4dejed	ejededej f
d%�Z(dej(fd&�Z)dej(fd'�Z*dej(fd(�Z+	dPdejed	ejedej fd)�Z,	dPdejed	ejedej fd*�Z-	dPdejed	ejedej fd+�Z.d,ej^ed-e0fd.edejed	ejedej2ej4f
d/�Z1				dQd0d1d.edejed	ejed2edejdej2ej4effd3�Z3Gd4�d5�Z4dedefd6�Z5dej2ej4defd7�Z6	dPdejej2ej4d8ejedefd9�Z7ejjd�rkerid:d;l8m9Z9defd<�Z:e�Z;ejxej ej fed=<	dRdej d8ejedej fd>�Z
nMdefd?�Z:d@ej dejed	ejedejej fdA�Z9dBede0fdC�Z=dej2ej4defdD�Z>dEejgejej fdFejgej fdejgejej ffdG�Z?e?dH�e,�Z@e?dI�e-�ZAe?dJ�e.�ZBe)e*e+dK�ZCej�eejgej(ffedL<e,e-e.dK�ZEej�eejejeejegej ffedM<y)S�N)�WeakKeyDictionary�cygwin�win�auto_wrap_for_ansiz\033\[[;?0-9]*[a-zA-Z]�stream�encoding�errors�force_readable�force_writable�returnc�F�|�t|�}|�d}t|||d||��S)N�replaceT)�line_bufferingr
r)�get_best_encoding�_NonClosingTextIOWrapper)rrr	r
rs     �//usr/lib/python3/dist-packages/click/_compat.py�_make_text_streamrs=����$�V�,��
�~���#�����%�%�
��c�f�	tj|�jdk(S#t$rYywxYw)z$Checks if a given encoding is ascii.�asciiF)�codecs�lookup�name�LookupError)rs r�is_ascii_encodingr$s3����}�}�X�&�+�+�w�6�6������s�!$�	0�0c�d�t|dd�xstj�}t|�ry|S)z1Returns the default stream encoding if not found.rNzutf-8)�getattr�sys�getdefaultencodingr)r�rvs  rrr,s.��	���T�	*�	F�c�.D�.D�.F�B�����
�Irc���eZdZ		ddejdej
edej
edededejddf�fd	�
Z	d
d
�Z
defd�Z�xZS)rrrr	r
r�extrarNc���tjtjt|||��x|_}t�|�|||fi|��y�N)�t�cast�BinaryIO�_FixupStream�_stream�super�__init__)�selfrrr	r
rr"�	__class__s       �rr+z!_NonClosingTextIOWrapper.__init__5sF���!"���
�J�J��V�^�^�L�!
�	
���v�	�����6�;�U�;rc�D�	|j�y#t$rYywxYwr$)�detach�	Exception�r,s r�__del__z _NonClosingTextIOWrapper.__del__Cs"��	��K�K�M���	��	�s��	�c�6�|jj�Sr$)r)�isattyr1s rr4z_NonClosingTextIOWrapper.isattyIs���|�|�"�"�$�$r�FF)rN)
�__name__�
__module__�__qualname__r%r'�Optional�str�bool�Anyr+r2r4�
__classcell__)r-s@rrr4s}��� %�$�
<��
�
�<��*�*�S�/�<��
�
�3��	<�
�<��
<����<�
�<��%��%rrc��eZdZdZ		ddej
dedefd�Zdedejfd�Z
d	edefd
�Z
defd�Zdefd�Zdefd
�Zy)r(aQThe new io interface needs more from streams than streams
    traditionally implement.  As such, this fix-up code is necessary in
    some circumstances.

    The forcing of readable and writable flags are there because some tools
    put badly patched objects on sys (one such offender are certain version
    of jupyter notebook).
    rr
rc�.�||_||_||_yr$)r)�_force_readable�_force_writable)r,rr
rs    rr+z_FixupStream.__init__Xs�����-���-��rrrc�.�t|j|�Sr$)rr)�r,rs  r�__getattr__z_FixupStream.__getattr__bs���t�|�|�T�*�*r�sizec��t|jdd�}|� tjt||��S|jj|�S)N�read1)rr)r%r&�bytes�read)r,rE�fs   rrGz_FixupStream.read1esC���D�L�L�'�4�0���=��6�6�%��4��)�)��|�|� � ��&�&rc���|jryt|jdd�}|�tjt
|��S	|jj
d�y#t$rYywxYw)NT�readablerF)r@rr)r%r&r;rIr0�r,�xs  rrLz_FixupStream.readablemsh�������D�L�L�*�d�3���=��6�6�$���$�$�	��L�L���a� ����	��	�s�A#�#	A/�.A/c�<�|jryt|jdd�}|�tjt
|��S	|jj
d�y#t$r/	|jj
d�Yy#t$rYYywxYwwxYw)NT�writable�rF)rArr)r%r&r;�writer0rMs  rrPz_FixupStream.writableys��������D�L�L�*�d�3���=��6�6�$���$�$�	��L�L���r�"����	�
����"�"�3�'����
��
��	�s*�A#�#	B�-B
�
	B�B�B�Bc��t|jdd�}|�tjt|��S	|jj|jj
��y#t$rYywxYw)N�seekableFT)rr)r%r&r;�seek�tellr0rMs  rrTz_FixupStream.seekable�si���D�L�L�*�d�3���=��6�6�$���$�$�	��L�L���d�l�l�/�/�1�2����	��	�s�3A.�.	A:�9A:Nr5)r6r7r8�__doc__r%r'r;r+r:r<rD�intrHrGrLrPrT�rrr(r(Ns���� %�$�	.��
�
�.��.��	.�+��+����+�'�#�'�%�'�
�$�
�
�$�
��$�rr(�defaultc�d�	t|jd�t�S#t$r|cYSwxYw�Nr)�
isinstancerIrHr0�rrZs  r�_is_binary_readerr_�s0����&�+�+�a�.�%�0�0�������s�!�/�/c��	|jd�y#t$r(	|jd�Yy#t$rYnwxYw|cYSwxYw)NrrQFT)rRr0r^s  r�_is_binary_writerra�sT������S������	��L�L������	��	����
�s%��	A�1�	=�A�=�A�Ac���t|d�r$tjtj|�St	|dd�}|�0t|d�r$tjtj|�Sy�NF�bufferT)r_r%r&r'r�r�bufs  r�_find_binary_readerrg��Z��
���'��v�v�a�j�j�&�)�)�
�&�(�D�
)�C���,�S�$�7��v�v�a�j�j�#�&�&�rc���t|d�r$tjtj|�St	|dd�}|�0t|d�r$tjtj|�Syrc)rar%r&r'rres  r�_find_binary_writerrj�rhrc�6�tt|dd�xsd�S)z3A stream is misconfigured if its encoding is ASCII.rNr)rr�rs r�_stream_is_misconfiguredrm�s���W�V�Z��>�I�'�J�Jr�attr�valuec�>�t||d�}||k(xs
|duxr|duS)z�A stream attribute is compatible if it is equal to the
    desired value or the desired value is unset and the attribute
    has a value.
    N)r)rrnro�stream_values    r�_is_compat_stream_attrrr�s0��
�6�4��.�L��5� �P�U�d�]�%O�|�4�7O�Prc�:�t|d|�xr
t|d|�S)zcCheck if a stream's encoding and errors attributes are
    compatible with the desired values.
    rr	)rr)rrr	s   r�_is_compatible_text_streamrt�s)��"��
�H��;�
 ���6�
:�;r�text_stream�	is_binary�find_binaryc�"�||d�r%tjtj|�}nNtjtj|�}t	|||�r|�t|�s|S||�}|�|S|}|�d}t
|||||��S)NFr)r
r)r%r&r'�TextIOrtrmr)	rurr	rvrwr
r�
binary_reader�possible_binary_readers	         r�_force_correct_text_streamr|�s�����e�$����q�z�z�;�7�
��f�f�Q�X�X�{�3��&�k�8�V�D���!9�+�!F���"-�[�!9��"�)���.�
��~�������%�%��r�text_readerc�4�t|||tt|��S)N�r
)r|r_rg)r}rr	r
s    r�_force_correct_text_readerr��#��&������%�
�r�text_writerc�4�t|||tt|��S)N�r)r|rarj)r�rr	rs    r�_force_correct_text_writerr�(r�rc�R�ttj�}|�td��|S)Nz6Was not able to determine binary stream for sys.stdin.)rgr�stdin�RuntimeError)�readers r�get_binary_stdinr�8s&��
 ����
+�F�
�~��S�T�T��Mrc�R�ttj�}|�td��|S)Nz7Was not able to determine binary stream for sys.stdout.)rjr�stdoutr���writers r�get_binary_stdoutr�?�&��
 ����
,�F�
�~��T�U�U��Mrc�R�ttj�}|�td��|S)Nz7Was not able to determine binary stream for sys.stderr.)rjr�stderrr�r�s r�get_binary_stderrr�Fr�rc�z�ttj||�}|�|Sttj||d��S)NTr)�_get_windows_console_streamrr�r��rr	r s   r�get_text_stdinr�Ms6��
%�S�Y�Y��&�	A�B�	�~��	�%�c�i�i��6�RV�W�Wrc�z�ttj||�}|�|Sttj||d��S�NTr�)r�rr�r�r�s   r�get_text_stdoutr�V�6��
%�S�Z�Z��6�	B�B�	�~��	�%�c�j�j�(�F�SW�X�Xrc�z�ttj||�}|�|Sttj||d��Sr�)r�rr�r�r�s   r�get_text_stderrr�_r�r�filezos.PathLike[str]�modec�@�d|vrt||�St||||��S)z?Handles not passing ``encoding`` and ``errors`` in binary mode.�b�rr	)�open)r�r�rr	s    r�
_wrap_io_openr�hs)���d�{��D�$�����d�X�f�=�=r�filenamezt.Union[str, os.PathLike[str]]�atomicc����d�v}tj|�}tj|�dk(rNt�fd�dD��r|rt	�dfSt||��dfS|rt
�dfSt||��dfS|st|�||�dfSd�vrtd	��d
�vrtd��d�vrtd
��ddl
}ddl}	tj|�j}tjtj ztj"z}	|r|	t%tdd�z}		tj&j)tj&j+|�d|j-d�d���}
	tj.|
|	|�dn|�}	|�tj>|
|�t|�||�}
tA|
|
tj&jC|��}tEjFtDjHtDjJ|�dfS#t$rd}Y��KwxYw#t$r�}|j|j0k(s�tj2dk(rv|j|j4k(r]tj&j7|j8�r4tj:|j8tj<�rYd}~����d}~wwxYw)Nr��-c3�&�K�|]}|�v���
y�wr$rY)�.0�mr�s  �r�	<genexpr>zopen_stream.<locals>.<genexpr>�s�����2�Q�q�D�y�2�s�)�w�arNFr�Tr�z�Appending to an existing file is not supported, because that would involve an expensive `copy`-operation to a temporary file. Open the file in normal `w`-mode and copy explicitly if that's what you're after.rNz&Use the `overwrite`-parameter instead.r�z,Atomic writes only make sense with `w`-mode.r�O_BINARYz.__atomic-writel�08xi��nt)&�os�fspath�fsdecode�anyr�r�r�r�r��
ValueError�errno�random�stat�st_mode�OSError�O_RDWR�O_CREAT�O_EXCLr�path�join�dirname�	randranger��EEXISTr�EACCES�isdirr��access�W_OK�chmod�_AtomicFile�realpathr%r&�IOr<)r�r�rr	r��binaryr�r��perm�flags�tmp_filename�fd�erJ�afs `             r�open_streamr�usy����D�[�F��y�y��"�H�
�{�{�8���#��2�/�2�2��(�*�E�1�1�"�H�V�D�e�K�K��#�%�u�,�,��x��?��F�F���X�t�X�v�>��D�D��d�{��
,�
�	
��d�{��A�B�B�
�$���G�H�H���� "���� 1� 9� 9��
�I�I��
�
�"�R�Y�Y�.�E�
�
���Z��+�+��
��w�w�|�|��G�G�O�O�H�%��f�.�.�w�7��<�=�
��	�����u�t�|�e��N�B����
����t�$��b�$��&�1�A�	�Q��b�g�g�&6�&6�x�&@�	A�B��6�6�!�$�$�q�u�u�+�r�"�D�(�(��?������ �	��w�w�%�,�,�&����4���G�G�u�|�|�+��G�G�M�M�!�*�*�-��I�I�a�j�j�"�'�'�2����	�s1�	H%�H7�%H4�3H4�7	K(�BK#�"K#�#K(c��eZdZdejej
dededdfd�Zedefd��Z	dde
ddfd	�Zd
edej
fd�Zdd�Z
d
ejejedej
ddfd�Zdefd�Zy)r�rJr��
real_filenamerNc�<�||_||_||_d|_y�NF)�_f�
_tmp_filename�_real_filename�closed)r,rJr�r�s    rr+z_AtomicFile.__init__�s �����)���+�����rc��|jSr$)r�r1s rrz_AtomicFile.name�s���"�"�"r�deletec��|jry|jj�tj|j
|j�d|_y)NT)r�r��closer�rr�r�)r,r�s  rr�z_AtomicFile.close�s:���;�;�����
�
��
�
�
�4�%�%�t�':�':�;���rrc�.�t|j|�Sr$)rr�rCs  rrDz_AtomicFile.__getattr__�s���t�w�w��%�%rc��|Sr$rYr1s r�	__enter__z_AtomicFile.__enter__�s���r�exc_type�_c�,�|j|du��y)N)r�)r�)r,r�r�s   r�__exit__z_AtomicFile.__exit__�s���
�
�(�$�.�
�/rc�,�t|j�Sr$)�reprr�r1s r�__repr__z_AtomicFile.__repr__�s���D�G�G�}�r�F)rr�)r6r7r8r%r�r<r:r+�propertyrr;r�rDr�r9�Type�
BaseExceptionr�r�rYrrr�r��s����!�$�$�q�u�u�+��S����QU���#�c�#��#��D��T��&��&����&��0����A�F�F�=�,A�!B�0����0�RV�0��#�rr�c�.�tjd|�S)NrQ)�_ansi_re�sub)ros r�
strip_ansir��s���<�<��E�"�"rc��t|ttf�r#|j}t|ttf�r�#|jj
j
d�S)Nz
ipykernel.)r]r(rr)r-r7�
startswithrls r�_is_jupyter_kernel_outputr��sL��
�V�l�,D�E�
F������V�l�,D�E�
F����&�&�1�1�,�?�?r�colorc�d�|�,|�tj}t|�xrt|�S|Sr$)rr�r4r�)rr�s  r�should_strip_ansir��s:��
�}��>��Y�Y�F��&�>�!�K�*C�F�*K�&K�K��9�r�)r�c�*�ddl}|j�Sr\)�locale�getpreferredencoding)r�s r�_get_argv_encodingr�s����*�*�,�,r�_ansi_stream_wrappersc�h���	tj|�}|�|Sddl}t	||�}|j||���t
jtj�j�}|j���fd�}||_
	|t|<|S#t$rd}Y��wxYw#t$rY|SwxYw)zbSupport ANSI color and style codes on Windows by wrapping a
        stream with colorama.
        Nr)�stripc�R��	�|�S#t$r�j��wxYwr$)r��	reset_all)�s�_write�ansi_wrappers ��r�_safe_writez'auto_wrap_for_ansi.<locals>._safe_writes0���
��a�y� �� �
��&�&�(��
�s��&)r��getr0�coloramar��AnsiToWin32r%r&ryrrR)	rr��cachedrr�r rrrs	       @@rrrs����	�*�.�.�v�6�F����M��!�&�%�0���+�+�F�%�+�@��
�V�V�A�H�H�l�1�1�
2������	����	�,.�!�&�)��	��7�	��F�	��0�	���	�	�s#�B�	B$�B!� B!�$	B1�0B1c�d�ttjdd�xstj�S)Nr)rrr��getfilesystemencodingrYrrr�r�.s#���s�y�y�*�d�3�R�s�7P�7P�7R�RrrJc��yr$rY)rJrr	s   rr�r�1s��rrNc�*�tt|��Sr$)�lenr�)rNs r�term_lenr7s���z�!�}��rc�B�	|j�S#t$rYywxYwr�)r4r0rls rr4r4;s%����}�}��������s��	��src_func�wrapper_funcc�r����t��dtjtjf���fd�}|S)Nrc�����}|�y	�j|�}|�|S��}	|�|<|S#t$rd}Y� wxYw#t$rY|SwxYwr$)rr0)rr �cacherrs  ���r�funcz&_make_cached_stream_func.<locals>.funcHs{�������>��	����6�"�B��>��I�
�^��	��E�&�M��	���	��B�	���	���	�	�s�1�A�?�?�	A�A)rr%r9ry)rrrrs`` @r�_make_cached_stream_funcrBs.���3D�2E�E��!�*�*�Q�X�X�&��&�Krc�"�tjSr$)rr�rYrr�<lambda>r^s
��s�y�y�rc�"�tjSr$)rr�rYrrrr_�
���
�
�rc�"�tjSr$)rr�rYrrrr`rr)r�r�r��binary_streams�text_streamsr5r�)NN)�rN�strictFr$)Fr�ior��rer�typingr%�weakrefr�platformr��CYGWIN�WINrr9�Callablery�__annotations__�compiler�r'r:r;rrr�r<r�
TextIOWrapperrr(r_rargrjrmrrrtr|r�r�r�r�r�r�r�r��UnionrXr��Tupler�r�r�r�r��_winconsoler�r�r��MutableMappingrr4r�_default_text_stdin�_default_text_stdout�_default_text_stderrr�MappingrrYrr�<module>r4s2��
�	�	�	�
��%�	���	 �	 ��	*��	�l�l���e�$��CG��A�J�J�q�z�z�1�8�8�*�a�h�h�*>�?�@�G��2�:�:�/�0��!� ��
�J�J���j�j��o��
�J�J�s�O���	�
���X�X�
�*������a�d�d�1�5�5�k��c��%�r�/�/�%�4B�B�J�a�d�d�1�5�5�k��D��T��
�a�d�d�1�5�5�k�
�D�
�T�
�����Q�U�U����
�
�1�:�:�0F��$����Q�U�U����
�
�1�:�:�0F��$K�Q�X�X�K�$�K�Q�1�8�8�Q�3�Q�q�z�z�#��Q�SW�Q�;�
�H�H�;� !�
�
�3��;�9:���C��;�	�;�"!� �+����a�e�e��+��j�j��o�+�
�J�J�s�O�+��z�z�1�4�4����;��-�t�3�4�	+�
���Q�T�T�!�%�%�[�M�1�:�:�a�j�j�+A�A�B�+��
+��+��X�X�+�d!�	
����a�e�e��
��j�j��o�
�
�J�J�s�O�
��	
�
�X�X�
�(!�	
����a�e�e��
��j�j��o�
�
�J�J�s�O�
��	
�
�X�X�
� �!�*�*���1�:�:���1�:�:��AE�X��j�j��o�X�./�j�j��o�X��X�X�X�AE�Y��j�j��o�Y�./�j�j��o�Y��X�X�Y�AE�Y��j�j��o�Y�./�j�j��o�Y��X�X�Y�
>�
�'�'�#�)�3�.�
/�
>�

�
>��j�j��o�
>�
�J�J�s�O�	
>�
�T�T�!�%�%�[�
>�� $�&��N)�.�N)�

�N)��j�j��o�N)�
�J�J�s�O�	N)�

�N)��W�W�Q�T�T�!�%�%�[�$�
��
N)�b��>#�c�#�c�#�@�a�d�d�1�5�5�k�@�d�@�GK��
�J�J�q�t�t�A�E�E�{�#��34�:�:�d�3C��	���<�<���5�!�c�8�-��-�
CT�BU��1�+�+�A�H�H�a�h�h�,>�?�U�59�#����#�!"���D�!1�#�	
���#�NS��S���8�8�� �z�z�#���89�
�
�3���	
���A�H�H�	��������1�4�4����;��4����j�j��Q�Z�Z����1�1�2���*�*�R����\�*���Z�Z��A�J�J�q�x�x�(�(�)��8/�/@�.�Q��/�0B�O�T��/�0B�O�T�����>���	�	�#�q�z�z�"�a�j�j�.�9�9�:������
�a�i�i�����Q�Z�Z��_�a�j�j��o�6����@�	A�A��r

Zerion Mini Shell 1.0