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

Error when using the tab-size option #12006

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Jun 24, 2024

Summary

This PR makes the warning when using the tab-size option an error. The tab-size option was deprecated in Ruff 0.1.2 (released October 2023).

Part of #7650

Test Plan

  • Verified that the option isn't used by the LSP (I searched for tab-size and tab_size)
  • Verified that the option isn't exposed via the CLI (other than using --config)
  • Verified that using the previously accepted tab-size option fails
❯ ../ruff/target/debug/ruff check test.py --config tab-size=2
ruff failed
  Cause: The `tab-size` option has been renamed to `indent-width` to emphasize that it configures the indentation used by the formatter as well as the tab width. Please update your `--config` CLI arguments to use `indent-width = <value>` instead.

❯ ../ruff/target/debug/ruff check test.py 
ruff failed
  Cause: The `tab-size` option has been renamed to `indent-width` to emphasize that it configures the indentation used by the formatter as well as the tab width. Please update `pyproject.toml` to use `indent-width = <value>` instead.
  • Verified that using indent-width works
❯ ../ruff/target/debug/ruff check test.py
warning: Detected debug build without --no-cache.

@MichaReiser MichaReiser changed the base branch from main to ruff-0.5 June 24, 2024 07:00
@MichaReiser MichaReiser added this to the v0.5.0 milestone Jun 24, 2024
@MichaReiser MichaReiser force-pushed the remove-deprecated-tab-size-option branch 2 times, most recently from ce1a64e to a13dacc Compare June 24, 2024 07:06
@MichaReiser MichaReiser marked this pull request as ready for review June 24, 2024 07:06
@MichaReiser MichaReiser added breaking Breaking API change configuration Related to settings and configuration cli Related to the command-line interface labels Jun 24, 2024
Copy link
Contributor

github-actions bot commented Jun 24, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser force-pushed the remove-deprecated-tab-size-option branch from a13dacc to 8411cfa Compare June 25, 2024 07:19
@MichaReiser MichaReiser changed the title Remove deprecated tab-size option Error when using the tab-size option Jun 25, 2024
@MichaReiser MichaReiser merged commit a239033 into ruff-0.5 Jun 25, 2024
20 checks passed
@MichaReiser MichaReiser deleted the remove-deprecated-tab-size-option branch June 25, 2024 07:36
This was referenced Jun 26, 2024
MichaReiser added a commit that referenced this pull request Jun 27, 2024
MichaReiser added a commit that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking API change cli Related to the command-line interface configuration Related to settings and configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants