-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature Request: Indents #3907
Comments
It doesn't exist right now, but it would likely be part of the formatter configuration eventually :) |
I would also be interested in a feature where you can configure regular indent and hanging indent separately |
Just want to add that this would be important for Google-related Open Source projects. |
I presume our existing formatter indentation configuration does not satisfy your requirement? https://docs.astral.sh/ruff/formatter/#configuration Can you provide some concrete examples of what you need? |
Hey @zanieb! Sure, so here is how it currently formats a function with a trailing comma in the arguments (or if the arguments are too long) using 2 space indentation: some_func(
foo,
bar,
) Some Google projects use 2 space indentation with 4 space hanging indentation: some_func(
foo,
bar,
) We are currently testing migrating from pyink to ruff, pyink does implement 4 space hanging indentation on 2 space indentation. You can try it out with the following config: [tool.pyink]
pyink-indentation = 2 |
Is there a way to directly specify the indentation style to apply in a codebase (4-space indent vs hanging indent etc.) via a config in ruff.toml? Thank you!
The text was updated successfully, but these errors were encountered: