Replies: 3 comments 6 replies
-
Welcome to Ruff! That's very interesting
This isn't possible because that's the recommended style in Python specifically for function calls and function parameters with default values (and without annotations). Refer to https://docs.astral.sh/ruff/rules/unexpected-spaces-around-keyword-parameter-equals/ and specifically the "Why is this bad?" section. |
Beta Was this translation helpful? Give feedback.
-
The E251 linter rule isn't enabled by default (and it's also in preview). Instead, the formatting of equal signs is being done by the Ruff formatter, not the linter. As PEP 8 is basically Python law, I don't think Ruff can disable this formatting, nor would (or should IMO) they add a setting to do so. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I'm new to ruff. I only knew ruff from this song from the Prodigy https://www.youtube.com/watch?v=eO82VmHn3fo - more this variant from here: https://youtu.be/jZxLgK07RYM?t=3434 if I recall
Nevertheless, I'm looking for a way to configure ruff with a space around the equal sign. I prefer in the below example the formatting shown in the first line and not the second one (I'm coming from R where the first syntax is more common)
How would you do that in Ruff, put that space around the equal sign or make sure Ruff does not overwrite that if I write it like that?
thanks!
Beta Was this translation helpful? Give feedback.
All reactions