Inconsistent line formatting when using ruff #13264
-
When using ruff formatter, I get an annoying behaviour like this: First time format the code: - support_care_config[profile]["AIConfig"][
- "additional_fallback"
- ] = additional_fallback
+ support_care_config[profile]["AIConfig"]["additional_fallback"] = (
+ additional_fallback
+ ) Change some code below this block and code, and then format the code again: - support_care_config[profile]["AIConfig"]["additional_fallback"] = (
- additional_fallback
- )
+ support_care_config[profile]["AIConfig"][
+ "additional_fallback"
+ ] = additional_fallback What might be the issue of this behavior? Really need some help here :( My ruff is at version |
Beta Was this translation helpful? Give feedback.
Answered by
dhruvmanila
Sep 6, 2024
Replies: 1 comment 8 replies
-
Hmm, I'm unable to reproduce this in the playground Can you tell me more about how you run ruff? Do you use Ruff in the editor or in the CLI? Do you have a more complete example that you could share? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This could happen. The snippet that you've provided would send the formatting request to all the server that supports formatting. What you want instead is to only send it to a specific server which can be done by: