The unused code would introduce a bug when used, thus I believe it's better to remove it.
Essentially, it would've flagged anydel statement within a loop, without check for the name.
However, because the B038Checker visits Del nodes, and doesn't call generic_visit from there, we'll never reach a Name node that has the ctx == Del.
I've added a test case, just to make sure :slightly_smiling_face:
The unused code would introduce a bug when used, thus I believe it's better to remove it.
Essentially, it would've flagged any
del
statement within a loop, without check for the name. However, because theB038Checker
visitsDel
nodes, and doesn't callgeneric_visit
from there, we'll never reach aName
node that has thectx == Del
.I've added a test case, just to make sure :slightly_smiling_face: