Merged
Conversation
This was referenced Oct 20, 2023
Merged
Member
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
charliermarsh
approved these changes
Oct 20, 2023
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). |
Member
There was a problem hiding this comment.
Nit: We typically stylize as PEP 8.
Member
Author
There was a problem hiding this comment.
I also fixed the reference to PEP257
Contributor
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
dhruvmanila
approved these changes
Oct 20, 2023
596a8ad to
bcfb73b
Compare
e7d0144 to
213ea75
Compare
213ea75 to
c567862
Compare
c567862 to
53fcb16
Compare
MichaReiser
commented
Oct 24, 2023
| locator: &Locator, | ||
| line_length: LineLength, | ||
| tab_size: TabSize, | ||
| tab_size: IndentWidth, |
Member
Author
There was a problem hiding this comment.
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
Member
Author
0df0d26 to
a205ebf
Compare
a205ebf to
b2649f2
Compare
Member
Author
|
@charliermarsh feel free to hit merge when the changes look reasonable to you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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