Skip to content
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

Enable Ruff RET (flake8-return) #13323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Enable Ruff RET (flake8-return) #13323

wants to merge 1 commit into from

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Dec 28, 2024

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 the else keyword to be helpful to your flow comprehension. (I like its reduced nesting, but certainly won't fight for it). 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.

@Avasam Avasam changed the title Enable Ruff flake8-return Enable Ruff RET (flake8-return) Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant