Skip to content

Commit

Permalink
Remove experimental formatter warning (#8148)
Browse files Browse the repository at this point in the history
Co-authored-by: Micha Reiser <micha@reiser.io>
  • Loading branch information
charliermarsh and MichaReiser committed Oct 24, 2023
1 parent 2f32a57 commit 7f4ea66
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion crates/ruff_cli/src/commands/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ pub(crate) enum FormatResult {
/// The file was unchanged, as the formatted contents matched the existing contents.
Unchanged,

/// Skipped formatting because its an unformatted file format
/// Skipped formatting because its an unsupported file format
Skipped,
}

Expand Down
2 changes: 0 additions & 2 deletions crates/ruff_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ pub fn run(
}

fn format(args: FormatCommand, log_level: LogLevel) -> Result<ExitStatus> {
warn_user_once!("`ruff format` is not yet stable, and subject to change in future versions.");

let (cli, overrides) = args.partition();

if is_stdin(&cli.files, cli.stdin_filename.as_deref()) {
Expand Down
12 changes: 0 additions & 12 deletions crates/ruff_cli/tests/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ if condition:
print('Hy "Micha"') # Should not change quotes
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
}

Expand Down Expand Up @@ -89,7 +88,6 @@ if condition:
print('Should change quotes')
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
Ok(())
}
Expand Down Expand Up @@ -117,7 +115,6 @@ fn mixed_line_endings() -> Result<()> {
----- stdout -----
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
2 files left unchanged
"###);
Ok(())
Expand Down Expand Up @@ -187,7 +184,6 @@ OTHER = "OTHER"
2 files would be reformatted
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
Ok(())
}
Expand Down Expand Up @@ -221,7 +217,6 @@ if __name__ == '__main__':
----- stdout -----
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
Ok(())
}
Expand Down Expand Up @@ -278,7 +273,6 @@ if condition:
print('Should change quotes')
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
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.
"###);
Ok(())
Expand Down Expand Up @@ -360,7 +354,6 @@ def say_hy(name: str):
1 file reformatted
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
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.
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.
"###);
Expand Down Expand Up @@ -400,7 +393,6 @@ def say_hy(name: str):
print(f"Hy {name}")
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
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.
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.
"###);
Expand Down Expand Up @@ -443,7 +435,6 @@ fn test_diff() {
z = 3
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
2 files would be reformatted, 1 file left unchanged
"###);
});
Expand Down Expand Up @@ -473,7 +464,6 @@ fn test_diff_no_change() {
z = 3
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
1 file would be reformatted
"###
);
Expand Down Expand Up @@ -507,7 +497,6 @@ fn test_diff_stdin_unformatted() {
z = 3
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
}

Expand All @@ -524,6 +513,5 @@ fn test_diff_stdin_formatted() {
----- stdout -----
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
}
1 change: 0 additions & 1 deletion crates/ruff_cli/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ fn stdin_format_jupyter() {
}
----- stderr -----
warning: `ruff format` is not yet stable, and subject to change in future versions.
"###);
}

Expand Down

0 comments on commit 7f4ea66

Please sign in to comment.