Skip to content

Commit 2f32a57

Browse files
authored
Remove --line-length option from format command (#8131)
1 parent 802616a commit 2f32a57

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

crates/ruff_cli/src/args.rs

-4
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,6 @@ pub struct FormatCommand {
402402
force_exclude: bool,
403403
#[clap(long, overrides_with("force_exclude"), hide = true)]
404404
no_force_exclude: bool,
405-
/// Set the line-length.
406-
#[arg(long, help_heading = "Rule configuration", hide = true)]
407-
pub line_length: Option<LineLength>,
408405
/// Ignore all configuration files.
409406
#[arg(long, conflicts_with = "config", help_heading = "Miscellaneous")]
410407
pub isolated: bool,
@@ -547,7 +544,6 @@ impl FormatCommand {
547544
stdin_filename: self.stdin_filename,
548545
},
549546
CliOverrides {
550-
line_length: self.line_length,
551547
respect_gitignore: resolve_bool_arg(
552548
self.respect_gitignore,
553549
self.no_respect_gitignore,

crates/ruff_python_formatter/README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,10 @@ quote-style = "single"
118118
```
119119

120120
The Ruff formatter also respects Ruff's [`line-length`](https://docs.astral.sh/ruff/settings/#line-length)
121-
setting, which also can be provided via a `pyproject.toml` or `ruff.toml` file, or on the CLI, as
122-
in:
121+
setting, which also can be provided via a `pyproject.toml` or `ruff.toml` file.
123122

124-
```console
125-
ruff format --line-length 100 /path/to/file.py
123+
```toml
124+
line-length = 80
126125
```
127126

128127
### Excluding code from formatting

0 commit comments

Comments
 (0)