Skip to content

Commit dbdfac2

Browse files
committed
Remove tab-size setting
1 parent 87ee0e0 commit dbdfac2

File tree

4 files changed

+38
-32
lines changed

4 files changed

+38
-32
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":807,"new":{"module_name":"format","snapshot_name":"deprecated_options","metadata":{"source":"crates/ruff/tests/format.rs","assertion_line":807,"info":{"program":"ruff","args":["format","--config","/tmp/.tmps9Wq7B/ruff.toml","-"],"stdin":"\nif True:\n pass\n "}},"snapshot":"success: false\nexit_code: 2\n----- stdout -----\n\n----- stderr -----\nruff failed\n Cause: Failed to parse [RUFF-TOML-PATH]\n Cause: TOML parse error at line 1, column 1\n |\n1 | \n | ^\nunknown field `tab-size`\n\n"},"old":{"module_name":"format","metadata":{},"snapshot":"success: false\nexit_code: 2\n----- stdout -----\n\n----- stderr -----\nruff failed\n 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 `[RUFF-TOML-PATH]` to use `indent-width = <value>` instead."}}
2+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":906,"new":null,"old":null}
3+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":668,"new":null,"old":null}
4+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":67,"new":null,"old":null}
5+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":760,"new":null,"old":null}
6+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":842,"new":null,"old":null}
7+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":292,"new":null,"old":null}
8+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":336,"new":null,"old":null}
9+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":708,"new":null,"old":null}
10+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":84,"new":null,"old":null}
11+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":100,"new":null,"old":null}
12+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":486,"new":null,"old":null}
13+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":634,"new":null,"old":null}
14+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1747,"new":null,"old":null}
15+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1766,"new":null,"old":null}
16+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1941,"new":null,"old":null}
17+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":546,"new":null,"old":null}
18+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":424,"new":null,"old":null}
19+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1791,"new":null,"old":null}
20+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":2034,"new":null,"old":null}
21+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1873,"new":null,"old":null}
22+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1966,"new":null,"old":null}
23+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1851,"new":null,"old":null}
24+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1833,"new":null,"old":null}
25+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1895,"new":null,"old":null}
26+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1920,"new":null,"old":null}
27+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":559,"new":null,"old":null}
28+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1254,"new":null,"old":null}
29+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1230,"new":null,"old":null}
30+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1196,"new":null,"old":null}
31+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":517,"new":null,"old":null}
32+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1269,"new":null,"old":null}
33+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":158,"new":null,"old":null}
34+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1988,"new":null,"old":null}
35+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":571,"new":null,"old":null}
36+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1133,"new":null,"old":null}
37+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1026,"new":null,"old":null}
38+
{"run_id":"949f64ef-a81e-401f-b165-44374ccea107","line":1068,"new":null,"old":null}

crates/ruff_workspace/src/configuration.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,6 @@ impl Configuration {
432432
}
433433
};
434434

435-
#[allow(deprecated)]
436-
if options.tab_size.is_some() {
437-
let config_to_update = path.map_or_else(
438-
|| String::from("your `--config` CLI arguments"),
439-
|path| format!("`{}`", fs::relativize_path(path)),
440-
);
441-
return Err(anyhow!("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 {config_to_update} to use `indent-width = <value>` instead."));
442-
}
443-
444435
#[allow(deprecated)]
445436
if options.output_format == Some(OutputFormat::Text) {
446437
let config_to_update = path.map_or_else(

crates/ruff_workspace/src/options.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -400,17 +400,6 @@ pub struct Options {
400400
)]
401401
pub indent_width: Option<IndentWidth>,
402402

403-
/// The number of spaces a tab is equal to when enforcing long-line violations (like `E501`)
404-
/// or formatting code with the formatter.
405-
///
406-
/// This option changes the number of spaces inserted by the formatter when
407-
/// using soft-tabs (`indent-style = space`).
408-
#[deprecated(
409-
since = "0.1.2",
410-
note = "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 configuration to use `indent-width = <value>` instead."
411-
)]
412-
pub tab_size: Option<IndentWidth>,
413-
414403
#[option_group]
415404
pub lint: Option<LintOptions>,
416405

ruff.schema.json

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)