§
    öyIfŸ  ã                  óz   — d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
 erd dlmZ  G d„ de¦  «        Zdd„ZdS )é    )Úannotations)ÚTYPE_CHECKING)Únodes)ÚBaseChecker)Úonly_required_for_messagesÚ
safe_infer)ÚPyLinterc                  ó^   — e Zd ZdZdZ ed¦  «        ZddiZ ed¦  «        dd„¦   «         Z	dS )ÚThreadingCheckerz‚Checks for threading module.

    - useless with lock - locking used in wrong way that has no effect (with threading.Lock():)
    Ú	threading)zthreading.Lockzthreading.RLockzthreading.Conditionzthreading.Semaphorezthreading.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      úU/var/www/piapp/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_withzThreadingChecker.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ð 	Qr   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ð 	Qr   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ðP6ð 6ð 6ð 6ð 6ð 6r   