Viewing File: /opt/hc_python/lib/python3.12/site-packages/pre_commit/__pycache__/file_lock.cpython-312.pyc

�

i0i/	��
�ddlmZddlZddlZddlZddlmZddlmZejdk(r ddl	Z	dZ
ej						d
d��Znddl
Z
ej						d
d��Zej						dd	��Zy)�)�annotationsN)�Callable)�	Generator�win32i��c#�K�	tj|tjt�	d��tj|tjt�y#t$rk|�		tj|tj
t�n5#t$r(}|jtjk7r�Yd}~nd}~wwxYw�`Y��wxYw#tj|tjt�wxYw�w�N)	�msvcrt�locking�LK_NBLCK�_region�OSError�LK_LOCK�errno�	EDEADLOCK�LK_UNLCK)�fileno�
blocked_cb�es   �C/opt/hc_python/lib/python3.12/site-packages/pre_commit/file_lock.py�_lockedrs�����
	��N�N�6�6�?�?�G�<�	=��
�N�N�6�6�?�?�G�<��-�	��L��	��N�N�6�6�>�>�7�C������w�w�%�/�/�1��2��	����	��,
�N�N�6�6�?�?�G�<�sb�D�)A�C�*D�C�.)B�C�	C	�!C�?C�C	�	C�
D�C�D�+C>�>Dc#�K�	tj|tjtjz�	d��tj|tj
�y#t$r.|�tj|tj�Y�`wxYw#tj|tj
�wxYw�wr)�fcntl�flock�LOCK_EX�LOCK_NBr
�LOCK_UN)rrs  rrr4s|����
	/��K�K���
�
��
�
� =�>�	/���K�K���
�
�.��
�	/��L��K�K���
�
�.�	/��
�K�K���
�
�.�s8�C�5A#�B�%C�#4B�C�B�C�&C�Cc#�K�t|d�5}t|j�|�5d��ddd�ddd�y#1swY�xYw#1swYyxYw�w)Nza+)�openrr)�pathr�fs   r�lockr!DsC����

�d�D�	�Q�
�Q�X�X�Z��
,��-�
�	�
,�
,��
�	�s1�
A�A�A�A�	A�A		�A�A�A)r�intr�Callable[[], None]�return�Generator[None])r�strrr#r$r%)�
__future__r�
contextlibr�sys�collections.abcrr�platformr	r�contextmanagerrrr!��r�<module>r/s���"���
�$�%��<�<�7����G����=��=�*�=�
�=��=�<����/��/�*�/�
�/��/�������&�����r.
Back to Directory File Manager