Skip to content

Commit

Permalink
Display the --preview option in the CLI help menu (#7274)
Browse files Browse the repository at this point in the history
If we're going to warn on use of NURSERY in #7210 we probably ought to
show the `--preview` option in our help menus.
  • Loading branch information
zanieb committed Sep 11, 2023
1 parent 73ad2af commit c21b960
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub struct CheckCommand {
#[arg(long, value_enum)]
pub target_version: Option<PythonVersion>,
/// Enable preview mode; checks will include unstable rules and fixes.
#[arg(long, overrides_with("no_preview"), hide = true)]
#[arg(long, overrides_with("no_preview"))]
preview: bool,
#[clap(long, overrides_with("preview"), hide = true)]
no_preview: bool,
Expand Down
2 changes: 2 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ Options:
Specify file to write the linter output to (default: stdout)
--target-version <TARGET_VERSION>
The minimum Python version that should be supported [possible values: py37, py38, py39, py310, py311, py312]
--preview
Enable preview mode; checks will include unstable rules and fixes
--config <CONFIG>
Path to the `pyproject.toml` or `ruff.toml` file to use for configuration
--statistics
Expand Down

0 comments on commit c21b960

Please sign in to comment.