~k]zddlmZddlmZddlmZddlmZddlm Z m Z erddl m Z GddeZ dd ZdS)) annotations) TYPE_CHECKING)nodes) BaseChecker)only_required_for_messages safe_infer)PyLinterc^eZdZdZdZedZddiZedd d Z d S)ThreadingCheckerzChecks for threading module. - useless with lock - locking used in wrong way that has no effect (with threading.Lock():) threading)zthreading.Lockzthreading.RLockzthreading.Conditionzthreading.Semaphorezthreading.BoundedSemaphoreW2101)z/'%s()' directly created in 'with' has no effectuseless-with-lockzUsed 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.rnode nodes.WithreturnNonecd|jD}|D]h}t|tjrLt |j}|3|}||jvr|d||idS)Nc3TK|]#\}}t|tj|V$dSN) isinstancerCall).0c_s s/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pylint/checkers/threading_checker.py z.ThreadingChecker.visit_with../s7RR$!Q 1ej8Q8QRARRRRRRr)rargs) itemsrrrrfuncqnameLOCKS add_message)selfrcontext_managerscontext_managerinfered_functionr!s r visit_withzThreadingChecker.visit_with-sRR$*RRR/ Q QO/5:66 Q#-o.B#C#C #+(..00DJ&&$$%8t%$PPP Q QrN)rrrr) __name__ __module__ __qualname____doc__name frozensetr"msgsrr(rrr r s D I   E   D  344 Q Q Q54 Q Q Qrr linterr rrcJ|t|dSr)register_checkerr )r1s rregisterr4:s% ,V4455555rN)r1r rr) __future__rtypingrastroidrpylint.checkersrpylint.checkers.utilsrr pylint.lintr r r4r0rrr;s #""""" ''''''HHHHHHHH%$$$$$$%Q%Q%Q%Q%Q{%Q%Q%QP666666r