Bug: C419
autofix removing list
within any
/all
causes undesirable short circuiting
#4320
Labels
fixes
Related to suggested fixes for violations
Please see the below code:
With
ruff==0.0.265
, and runningruff --select=C419 --fix a.py
, it removes thelist
cast:However, this actually added a subtle bug, because now the
all
statement will be short-circuited. This short circuiting (in my scenario here) will cause all workers beyond the firstw.wait()
return ofFalse
to not be awaited.I think
C4
autofixing should not be applied withinall
/any
, as these can be short circuited, which can cause undesirable side effects.The text was updated successfully, but these errors were encountered: