mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-12 21:36:47 +00:00
Reduce the API of ruff_cli to ruff_cli::help()
This commit is contained in:
parent
92124001d5
commit
a181ca7a3d
2 changed files with 8 additions and 6 deletions
|
@ -1,8 +1,7 @@
|
|||
//! Generate CLI help.
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::{Args, CommandFactory};
|
||||
use ruff_cli::Cli as MainCli;
|
||||
use clap::Args;
|
||||
|
||||
use crate::utils::replace_readme_section;
|
||||
|
||||
|
@ -21,8 +20,7 @@ fn trim_lines(s: &str) -> String {
|
|||
}
|
||||
|
||||
pub fn main(cli: &Cli) -> Result<()> {
|
||||
let mut cmd = MainCli::command();
|
||||
let output = trim_lines(cmd.render_help().to_string().trim());
|
||||
let output = trim_lines(ruff_cli::help().trim());
|
||||
|
||||
if cli.dry_run {
|
||||
print!("{output}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue