Conversation
|
I don't find these to be improvements. |
Just to be clear, are you talking about the changes caused by |
|
Hmmm... I think I'm -1 on this whole category, actually. These all seem like pretty pedantic stylistic lints that sometimes hurt readability, and usually don't significantly improve readability. (In the rare occasions where there is a significant improvement in readability, I think we'd probably just flag it in code review.) I think overall this category would be likely just to cause us irritation rather than actually help us, so I think I'd prefer to leave these disabled |
|
Let's close this one and leave it to reviews. |
Ref #13295
https://docs.astral.sh/ruff/rules/#flake8-return-ret
Everything is autofixable
superfluous-else-*(RET505-RET508)'s "make the code more readable" is arguable if you find theelsekeyword to be helpful to your flow comprehension.I like its reduced nesting for early conditional guards, but it incidentally catches more than that. Maybe if it could be configured to not apply to single statements ? (astral-sh/ruff#15167)
I find the rest of the RET rules to be good sanity checks.