I use double underscore __ as my dump variable instead of _, like so:
needed_value, __ = do_stuff()
use_value(needed_value)
However, flake8 complains as it think I'm not using this variable. That's true, but it's on purpose.
Any way to silent flake8 for this particular use case ?
A #noqa is possible but I'd like an option to do this on the whole project
the code you pasted does not produce an error
the underlying plugin pyflakes will only produce F841 for normal assignments, not unpackings as you've written
this must mean that you have code that looks like:
def f():
__ = foo()
which in that case, there's no reason for your dump variable and you should rewrite it to remove __ =
disclaimer: I'm the current flake8 maintainer and I'm one of the pyflakes maintainers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With