Skip to content
Discussion options

You must be logged in to vote

Thank you for the report!

I believe you're seeing our preview formatting in VS Code, corresponding to the hug_parens_with_braces_and_square_brackets feature (#8279). This doesn't actually seemed to be documented in our preview docs. I see you have lint.preview enabled in your ruff.toml, but I don't see format.preview, so I'm not sure where VS Code is getting that, unless you have it enabled in your editor config somewhere.

Since you want the preview behavior, you could just set format.preview in ruff.toml, or move lint.preview to the top-level preview setting, which will enable it for both the linter and formatter!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anamoyee
Comment options

Answer selected by anamoyee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants