Skip to content
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

Rename tab-size to tab-width #7643

Closed
Tracked by #7642
MichaReiser opened this issue Sep 25, 2023 · 0 comments · Fixed by #8082
Closed
Tracked by #7642

Rename tab-size to tab-width #7643

MichaReiser opened this issue Sep 25, 2023 · 0 comments · Fixed by #8082
Assignees
Labels
breaking Breaking API change configuration Related to settings and configuration

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Sep 25, 2023

Rename the tab-size option to tab-width.

The old tab-size option should act as an alias. Ruff should warn and hint users towards migrating to the new option.

@MichaReiser MichaReiser added breaking Breaking API change configuration Related to settings and configuration labels Sep 25, 2023
@MichaReiser MichaReiser added this to the Formatter: Beta milestone Sep 25, 2023
@MichaReiser MichaReiser self-assigned this Oct 17, 2023
@MichaReiser MichaReiser changed the title Rename tab-size to tab-width and change default to 8 Rename tab-size to tab-width Oct 20, 2023
charliermarsh pushed a commit that referenced this issue Oct 24, 2023
## Summary

This PR renames the `tab-size` configuration option to `indent-width` to
express that the formatter uses the option to determine the indentation
width AND as tab width.

I first preferred naming the option `tab-width` but then decided to go
with `indent-width` because:

* It aligns with the `indent-style` option
* It would allow us to write a lint rule that asserts that each
indentation uses `indent-width` spaces.

 Closes #7643

## Test Plan

Added integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking API change configuration Related to settings and configuration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant