OwlCyberSecurity - MANAGER
Edit File: threading_checker.cpython-311.pyc
� ������h�����������������������z�����d�dl�mZ�d�dlmZ�d�dlmZ�d�dlmZ�d�dlm Z m Z �erd�dlmZ��G�d��de������������Z dd �ZdS�)�����)�annotations)� TYPE_CHECKING)�nodes)�BaseChecker)�only_required_for_messages� safe_infer)�PyLinterc�������������������^�����e�Zd�ZdZdZ�ed������������ZddiZ�ed������������d d���������������Z dS�)�ThreadingCheckerz�Checks for threading module. - useless with lock - locking used in wrong way that has no effect (with threading.Lock():) � threading)zthreading.Lockzthreading.RLockzthreading.Conditionzthreading.Semaphorezthreading.BoundedSemaphore�W2101)z/'%s()' directly created in 'with' has no effect�useless-with-lockz�Used when a new lock instance is created by using with statement which has no effect. Instead, an existing instance should be used to acquire lock.r����node� nodes.With�return�Nonec����������������������d��|j���������D���������������}|D�]h}t����������|t����������j��������������������rLt ����������|j��������������������}|��3|�����������������������������������}||�j��������v�r|����������������������d||���������������id�S�)Nc��������������3���T���K����|�]#\��}}t����������|t����������j���������������������|V����$d�S��N)� isinstancer����Call)�.0�c�_s��� �r/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/pylint/checkers/threading_checker.py� <genexpr>z.ThreadingChecker.visit_with.<locals>.<genexpr>/���s7����������R�R�$�!�Q� �1�e�j�8Q�8Q�R�A�R�R�R�R�R�R�����r���)r����args) �itemsr���r���r���r����func�qname�LOCKS�add_message)�selfr����context_managers�context_manager�infered_functionr!���s��� r���� visit_withzThreadingChecker.visit_with-���s�������R�R�$�*�R�R�R��/�� Q�� Q�O��/�5�:�6�6�� Q�#-�o�.B�#C�#C� �#�+��(�.�.�0�0���D�J�&�&��$�$�%8�t�%�$�P�P�P�� Q�� Qr���N)r���r���r���r���) �__name__� __module__�__qualname__�__doc__�name� frozensetr"����msgsr���r(�����r���r���r���r������s����������������� ��D��I� � �� �E�� �� ��D�� �� 3�4�4� Q�� Q�� Q��5�4� Q�� Q�� Qr���r����linterr ���r���r���c�����������������J�����|�����������������������t����������|��������������������������d�S�r���)�register_checkerr���)r1���s��� r����registerr4���:���s%������ ���,�V�4�4�5�5�5�5�5r���N)r1���r ���r���r���)� __future__r����typingr����astroidr����pylint.checkersr����pylint.checkers.utilsr���r����pylint.lintr ���r���r4���r0���r���r����<module>r;������s������ �#��"��"��"��"��"�� �� �� �� �� �� ��������������'��'��'��'��'��'��H��H��H��H��H��H��H��H���%�$�$�$�$�$�$�%Q��%Q��%Q��%Q��%Q�{��%Q��%Q��%Q�P6��6��6��6��6��6r���