[feature request] Unused variable warning for "except Exception as e"
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@goubiq.com
Hi Shane, Can you share what version of pyflakes and on what version of python you're running? For future reference, I think the preferred location for ideas and bugs is github.com/PyCQA/pyflakes/issues Sent from my phone with my typo-happy thumbs. Please excuse my brevity On Sun, Apr 15, 2018, 20:09 Shane Creighton-Young <shane@goubiq.com> wrote:
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@goubiq.com
_______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
Hi Ian, I am running python 3.6.4 and pyflakes 1.6.0 via flake8 3.5.0. On Sun, Apr 15, 2018 at 9:11 PM, Ian Stapleton Cordasco < graffatcolmingov@gmail.com> wrote:
Hi Shane,
Can you share what version of pyflakes and on what version of python you're running?
For future reference, I think the preferred location for ideas and bugs is github.com/PyCQA/pyflakes/issues
Sent from my phone with my typo-happy thumbs. Please excuse my brevity
On Sun, Apr 15, 2018, 20:09 Shane Creighton-Young <shane@goubiq.com> wrote:
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@goubiq.com
_______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
participants (2)
-
Ian Stapleton Cordasco
-
Shane Creighton-Young