mirror of
https://github.com/astral-sh/ruff
synced 2026-01-10 16:15:19 -05:00
Add --range option to ruff format (#9733)
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
This commit is contained in:
@@ -654,7 +654,7 @@ Options:
|
||||
Enable preview mode; enables unstable formatting. Use `--no-preview`
|
||||
to disable
|
||||
-h, --help
|
||||
Print help
|
||||
Print help (see more with '--help')
|
||||
|
||||
Miscellaneous:
|
||||
-n, --no-cache
|
||||
@@ -679,6 +679,14 @@ File selection:
|
||||
Format configuration:
|
||||
--line-length <LINE_LENGTH> Set the line-length
|
||||
|
||||
Editor options:
|
||||
--range <RANGE> When specified, Ruff will try to only format the code in
|
||||
the given range.
|
||||
It might be necessary to extend the start backwards or
|
||||
the end forwards, to fully enclose a logical line.
|
||||
The `<RANGE>` uses the format
|
||||
`<start_line>:<start_column>-<end_line>:<end_column>`.
|
||||
|
||||
Log levels:
|
||||
-v, --verbose Enable verbose logging
|
||||
-q, --quiet Print diagnostics, but nothing else
|
||||
|
||||
Reference in New Issue
Block a user