Closed
Description
describe the request
It would be interesting to add a linting check for exception chaining, i.e., raising new exception with catch
case using the raise from
style
try:
* code causes an exception *
except Exception as e:
raise TypeError("...") from e
Based on this blog post - https://blog.ram.rachum.com/post/621791438475296768/improving-python-exception-chaining-with
This rule has already been added to pylint, pylint-dev/pylint#3695
But the rule seems to be relevant to flake8 as well
I have looked through the issues and couldn't find a similar request, apologies if already requested.
@cool-RR is the blog posts original author
Metadata
Metadata
Assignees
Labels
No labels