-
Notifications
You must be signed in to change notification settings - Fork 57
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
Added documentation and code examples for W0134 return-in-finally checker #1000
Added documentation and code examples for W0134 return-in-finally checker #1000
Conversation
Pull Request Test Coverage Report for Build 7688896823Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
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.
Good work, @MariaMa-GitHub! I left a few inline comments, and in addition to that have two overall comments:
- Since this is your first pull request, please add your name to the list of contributors :)
- In terms of decided where to put the error, it's a bit ad hoc right now. One guiding principle I use is to look for similar errors, or errors that are related to the same language features. In this case, you should look for errors related to exceptions (some recent ones are the "too broad exception" ones) and put this entry close to those. Don't worry about categorizing as "style" vs. "error" within PythonTA though, that's something we can revisit later.
…r code to heading
Motivation and Context
W0134 return-in-finally is a new check in Pylint which was added at the end of last semester, so it needed to be added to the PythonTA documentation. This pull request resolves the issue by providing documentation and examples for this checker.
Fixes #999.
Your Changes
Description:
Type of change (select all that apply):
Testing
This pull request was tested using PythonTA with the code below.
The PythonTA report correctly showed that the W0134 (return-in-finally) error was raised.
Questions and Comments (if applicable)
I am not too sure how to classify the W0134 (return-in-finally) error. I chose to put it under "Improper Python usage" since I think that it does "indicate a misuse of variables, control flow, or other Python features in our code" and it is similar to other errors in the same section (such as Return outside function (E0104) and Unreachable (W0101)). However, when I ran PythonTA, it put the W0134 (return-in-finally) error under "Style and Convention", which also makes a bit of sense. Since I am not too sure how exactly this checker should be classified, I would like to ask under which section should it be put and in the future how should I decide if there are conflicts like this happening.
Checklist