-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use raise .. from ..
to explicitly chain exceptions
#3750
Use raise .. from ..
to explicitly chain exceptions
#3750
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3750 +/- ##
=======================================
+ Coverage 87% 90% +3%
=======================================
Files 110 110
Lines 8858 8730 -128
=======================================
+ Hits 7731 7842 +111
+ Misses 1127 888 -239 |
I see CI failing but I believe these errors are caused not due to the changes I made. |
73908d0
to
69f521e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two suggestions to be consistent with the naming
Co-authored-by: Nicki Skafte <[email protected]>
Co-authored-by: Nicki Skafte <[email protected]>
This pull request is now in conflict... :( |
@akihironitta have you checked if there are no more such places where this needs to be updated? |
@rohitgr7 Yes, I believe. When exceptions are Below is the list of all lines containing
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Use `raise .. from ..` to explicitly chain exceptions (Lightning-AI#3750)
What does this PR do?
Motivation
Fixes and closes #3679.
Description of the changes
I changed lines where
raise
ing an exception inexcept
to either:raise .. from e
to explicitly chain exceptions where the exceptione
has valuable information and seems useful for users.<- There were no places where this option is applicable in my opinion.raise .. from None
to unchain exceptions where the previous exception has no valuable information and seems noisy and redundant.Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃