Skip to content

Error when using the tab-size option#12006

Merged
MichaReiser merged 2 commits intoruff-0.5from
remove-deprecated-tab-size-option
Jun 25, 2024
Merged

Error when using the tab-size option#12006
MichaReiser merged 2 commits intoruff-0.5from
remove-deprecated-tab-size-option

Conversation

@MichaReiser
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
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
@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