Skip to content

Commit 7f4ea66

Browse files
Remove experimental formatter warning (#8148)
Co-authored-by: Micha Reiser <[email protected]>
1 parent 2f32a57 commit 7f4ea66

File tree

4 files changed

+1
-16
lines changed

4 files changed

+1
-16
lines changed

crates/ruff_cli/src/commands/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ pub(crate) enum FormatResult {
437437
/// The file was unchanged, as the formatted contents matched the existing contents.
438438
Unchanged,
439439

440-
/// Skipped formatting because its an unformatted file format
440+
/// Skipped formatting because its an unsupported file format
441441
Skipped,
442442
}
443443

crates/ruff_cli/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ pub fn run(
172172
}
173173

174174
fn format(args: FormatCommand, log_level: LogLevel) -> Result<ExitStatus> {
175-
warn_user_once!("`ruff format` is not yet stable, and subject to change in future versions.");
176-
177175
let (cli, overrides) = args.partition();
178176

179177
if is_stdin(&cli.files, cli.stdin_filename.as_deref()) {

crates/ruff_cli/tests/format.rs

-12
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ if condition:
4040
print('Hy "Micha"') # Should not change quotes
4141
4242
----- stderr -----
43-
warning: `ruff format` is not yet stable, and subject to change in future versions.
4443
"###);
4544
}
4645

@@ -89,7 +88,6 @@ if condition:
8988
print('Should change quotes')
9089
9190
----- stderr -----
92-
warning: `ruff format` is not yet stable, and subject to change in future versions.
9391
"###);
9492
Ok(())
9593
}
@@ -117,7 +115,6 @@ fn mixed_line_endings() -> Result<()> {
117115
----- stdout -----
118116
119117
----- stderr -----
120-
warning: `ruff format` is not yet stable, and subject to change in future versions.
121118
2 files left unchanged
122119
"###);
123120
Ok(())
@@ -187,7 +184,6 @@ OTHER = "OTHER"
187184
2 files would be reformatted
188185
189186
----- stderr -----
190-
warning: `ruff format` is not yet stable, and subject to change in future versions.
191187
"###);
192188
Ok(())
193189
}
@@ -221,7 +217,6 @@ if __name__ == '__main__':
221217
----- stdout -----
222218
223219
----- stderr -----
224-
warning: `ruff format` is not yet stable, and subject to change in future versions.
225220
"###);
226221
Ok(())
227222
}
@@ -278,7 +273,6 @@ if condition:
278273
print('Should change quotes')
279274
280275
----- stderr -----
281-
warning: `ruff format` is not yet stable, and subject to change in future versions.
282276
warning: The following rules may cause conflicts when used with the formatter: 'Q000'. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding then to the `ignore` configuration.
283277
"###);
284278
Ok(())
@@ -360,7 +354,6 @@ def say_hy(name: str):
360354
1 file reformatted
361355
362356
----- stderr -----
363-
warning: `ruff format` is not yet stable, and subject to change in future versions.
364357
warning: The following rules may cause conflicts when used with the formatter: 'COM812', 'COM819', 'D206', 'E501', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003', 'W191'. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding then to the `ignore` configuration.
365358
warning: The following isort options may cause conflicts when used with the formatter: 'isort.force-single-line', 'isort.force-wrap-aliases', 'isort.lines-after-imports', 'isort.lines_between_types'. To avoid unexpected behavior, we recommend disabling these options by removing them from the configuration.
366359
"###);
@@ -400,7 +393,6 @@ def say_hy(name: str):
400393
print(f"Hy {name}")
401394
402395
----- stderr -----
403-
warning: `ruff format` is not yet stable, and subject to change in future versions.
404396
warning: The following rules may cause conflicts when used with the formatter: 'COM812', 'COM819', 'D206', 'E501', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003', 'W191'. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding then to the `ignore` configuration.
405397
warning: The following isort options may cause conflicts when used with the formatter: 'isort.force-single-line', 'isort.force-wrap-aliases', 'isort.lines-after-imports', 'isort.lines_between_types'. To avoid unexpected behavior, we recommend disabling these options by removing them from the configuration.
406398
"###);
@@ -443,7 +435,6 @@ fn test_diff() {
443435
z = 3
444436
445437
----- stderr -----
446-
warning: `ruff format` is not yet stable, and subject to change in future versions.
447438
2 files would be reformatted, 1 file left unchanged
448439
"###);
449440
});
@@ -473,7 +464,6 @@ fn test_diff_no_change() {
473464
z = 3
474465
475466
----- stderr -----
476-
warning: `ruff format` is not yet stable, and subject to change in future versions.
477467
1 file would be reformatted
478468
"###
479469
);
@@ -507,7 +497,6 @@ fn test_diff_stdin_unformatted() {
507497
z = 3
508498
509499
----- stderr -----
510-
warning: `ruff format` is not yet stable, and subject to change in future versions.
511500
"###);
512501
}
513502

@@ -524,6 +513,5 @@ fn test_diff_stdin_formatted() {
524513
----- stdout -----
525514
526515
----- stderr -----
527-
warning: `ruff format` is not yet stable, and subject to change in future versions.
528516
"###);
529517
}

crates/ruff_cli/tests/integration_test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ fn stdin_format_jupyter() {
485485
}
486486
487487
----- stderr -----
488-
warning: `ruff format` is not yet stable, and subject to change in future versions.
489488
"###);
490489
}
491490

0 commit comments

Comments
 (0)