Closed
Description
Current problem
We've had a few instances of
with threading.Lock():
<statements>
escape detection during review and find their way into our codebase; these are never correct or desired.
Desired solution
Would love for the code to be warned with with something like looks-like-mutual-exclusion-was-wanted-but-this-code-doesn't-achieve-mutual-exclusion
or... a shorter, nicer warning name. 🙂
Additional context
For a file with contents
import threading
def not_a_helpful_function(parameter):
with threading.Lock():
print(parameter)
pylint-2.11.1
does not detect any logic problem in the code (it complains about the missing doc strings).