We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm looking for a way to configure Ruff to disallow double assignments in single lines, like this:
name, position = files.name, pos
Instead, I want the linter to enforce separate assignments on separate lines, like this:
name = files.name position = pos
However, I still want to allow tuple unpacking, like this:
name, position = extract_details()
Is there a way to configure Ruff to achieve this behavior?
The text was updated successfully, but these errors were encountered:
I don't think such a rule exists today. I just tried to see if Ruff flags the assignment when enabling all rules but it doesn't.
https://play.ruff.rs/e1feb7f2-7c32-4bfd-ae87-b12102a382a4
Sorry, something went wrong.
Hi @MichaReiser , thanks for replying. Do you think it would be possible to add this rule? 🙂
No branches or pull requests
I'm looking for a way to configure Ruff to disallow double assignments in single lines, like this:
Instead, I want the linter to enforce separate assignments on separate lines, like this:
However, I still want to allow tuple unpacking, like this:
Is there a way to configure Ruff to achieve this behavior?
The text was updated successfully, but these errors were encountered: