[code-quality] [feature request] Unused variable warning for "except Exception as e"

Shane Creighton-Young shane at goubiq.com
Sun Apr 15 17:14:20 EDT 2018


Hello flake8!

I would have expected pyflakes to emit an unused variables warning for "e"
on the following code snippet:

class ModuleError(Exception):
    pass

try:
    1 / 0
except ZeroDivisionError as e:
    raise ModuleError()

Curious if this check can be added.

Thank you!

--
Shane Creighton-Young
shane at goubiq.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/code-quality/attachments/20180415/de4f9309/attachment.html>


More information about the code-quality mailing list