Closed jendrikseipp closed 2 years ago
Thanks for the report @sshishov! I agree that del a
should mark the a
variable as used.
Here is a little test case for this:
def foo(a):
del a
return 1
foo(2)
To implement this, one would need to count Name(id='a', ctx=Del())
in the abstract syntax tree as a usage of variable a
. Pull requests welcome :-)
@jendrikseipp let's close this.
Thanks for the reminder! Yes, this has been fixed in the meantime.
Hello guys, for overridden functions and unused arguments, can the
vulture
follow the same rules as pylint and other tools.It is described here: https://stackoverflow.com/a/14836005
And this is specified as the suggested solution by PyLint: http://pylint-messages.wikidot.com/messages:w0613
Currently I am trying to use
del
butvulture
is still reporting the variable asunused
Originally posted by @sshishov in https://github.com/jendrikseipp/vulture/issues/235#issuecomment-1105162434