OwlCyberSecurity - MANAGER
Edit File: file_lock.cpython-312.pyc
� i��g& � � � d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ ej dk( r d dl Z dZej d d�� Z nd dlZej d d�� Z ej dd �� Zy)� )�annotationsN)� Generator)�Callable�win32i�� c # � K � t j | t j t � d �� t j | t j t � y # t $ rk |� t j | t j t � n5# t $ r(}|j t j k7 r� Y d }~nd }~ww xY w�`Y ��w xY w# t j | t j t � w xY w�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�_lockedr s� � �� � ��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 � t j | t j t j z � d �� t j | t j � y # t $ r. |� t j | t j � Y �`w xY w# t j | t j � w xY w�wr )�fcntl�flock�LOCK_EX�LOCK_NBr �LOCK_UN)r r s r r r 4 s| � �� � /��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 � |� 5 d �� d d d � d d d � y # 1 sw Y �xY w# 1 sw Y y xY w�w)Nza+)�openr r )�pathr �fs r �lockr! D sC � �� � �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 �strr r# r$ r% )� __future__r � contextlibr �sys�collections.abcr �typingr �platformr r �contextmanagerr r r! � � r �<module>r0 s� �� "� � � � %� � �<�<�7��� �G����=��=�*�=� �=� �=�<