-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Rename tab-size to indent-width
#8082
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
Conversation
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
crates/ruff_workspace/src/options.rs
Outdated
| /// This option changes the number of spaces the formatter inserts when | ||
| /// using soft-tabs (`indent-style = space`). | ||
| /// | ||
| /// PEP8 recommends using 4 spaces per [indentation level](https://peps.python.org/pep-0008/#indentation). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We typically stylize as PEP 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also fixed the reference to PEP257
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
596a8ad to
bcfb73b
Compare
e7d0144 to
213ea75
Compare
213ea75 to
c567862
Compare
c567862 to
53fcb16
Compare
| locator: &Locator, | ||
| line_length: LineLength, | ||
| tab_size: TabSize, | ||
| tab_size: IndentWidth, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could rename all these fields but here the indent-width is used as tab-width only, so keeping it as is felt correct.
1c1aed4 to
de85ade
Compare
53fcb16 to
0df0d26
Compare
0df0d26 to
a205ebf
Compare
a205ebf to
b2649f2
Compare
|
@charliermarsh feel free to hit merge when the changes look reasonable to you |

Summary
This PR renames the
tab-sizeconfiguration option toindent-widthto express that the formatter uses the option to determine the indentation width AND as tab width.I first preferred naming the option
tab-widthbut then decided to go withindent-widthbecause:indent-styleoptionindent-widthspaces.Closes #7643
Test Plan
Added integration test