-
-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
Make some ruff fixes #8154
Make some ruff fixes #8154
Conversation
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.
Looks good. There's just one thing I noticed which is that some places have explicit return None
while others implicit return
. I think we should adopt one or the other. What do you think?
Those rules cover different situations: implicit returns and unnecessary returns. Sometimes
|
The rules exists, but it depends on the project, the maintainers and the audience through which the choice of rules need to be made. Just because a rule exist, doesn't mean it's a necessary thing to do. This is what I think but it's upto you. If you think it's fine, then ok, but I think consistency matters. |
I think that the rules make sense as they are. For functions that never return a value, it is unnecessary to add an extra line at the end. |
* Make some ruff fixes * Undo manual fix * Undo manual fix * Updates from ruff=0.0.251
* Make some ruff fixes * Undo manual fix * Undo manual fix * Updates from ruff=0.0.251
Describe your change:
ruff --select=RET501,RET502,RET503,SIM101,SIM102,SIM108,SIM109,SIM110,SIM117,SIM118,SIM201,SIM300,PD002,RUF005 --fix .
Checklist:
Fixes: #{$ISSUE_NO}
.