Skip to content

Commit d28c5af

Browse files
[red-knot] Remove mentions of Ruff from the CLI help (#12752)
Co-authored-by: Micha Reiser <micha@reiser.io>
1 parent f1de08c commit d28c5af

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

crates/red_knot/src/main.rs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mod verbosity;
2727
#[command(
2828
author,
2929
name = "red-knot",
30-
about = "An experimental multifile analysis backend for Ruff"
30+
about = "An extremely fast Python type checker."
3131
)]
3232
#[command(version)]
3333
struct Args {
@@ -67,7 +67,12 @@ to resolve type information for the project's third-party dependencies.",
6767
)]
6868
extra_search_path: Vec<SystemPathBuf>,
6969

70-
#[arg(long, help = "Python version to assume when resolving types", default_value_t = TargetVersion::default(), value_name="VERSION")]
70+
#[arg(
71+
long,
72+
help = "Python version to assume when resolving types",
73+
default_value_t = TargetVersion::default(),
74+
value_name="VERSION")
75+
]
7176
target_version: TargetVersion,
7277

7378
#[clap(flatten)]
@@ -97,7 +102,7 @@ pub fn main() -> ExitStatus {
97102

98103
// This communicates that this isn't a linter error but Red Knot itself hard-errored for
99104
// some reason (e.g. failed to resolve the configuration)
100-
writeln!(stderr, "{}", "ruff failed".red().bold()).ok();
105+
writeln!(stderr, "{}", "Red Knot failed".red().bold()).ok();
101106
// Currently we generally only see one error, but e.g. with io errors when resolving
102107
// the configuration it is help to chain errors ("resolving configuration failed" ->
103108
// "failed to read file: subdir/pyproject.toml")
@@ -132,7 +137,13 @@ fn run() -> anyhow::Result<ExitStatus> {
132137
// The base path to which all CLI arguments are relative to.
133138
let cli_base_path = {
134139
let cwd = std::env::current_dir().context("Failed to get the current working directory")?;
135-
SystemPathBuf::from_path_buf(cwd).map_err(|path| anyhow!("The current working directory '{}' contains non-unicode characters. Red Knot only supports unicode paths.", path.display()))?
140+
SystemPathBuf::from_path_buf(cwd)
141+
.map_err(|path| {
142+
anyhow!(
143+
"The current working directory '{}' contains non-unicode characters. Red Knot only supports unicode paths.",
144+
path.display()
145+
)
146+
})?
136147
};
137148

138149
let cwd = current_directory
@@ -308,7 +319,9 @@ impl MainLoop {
308319
tracing::error!("{}", diagnostic);
309320
}
310321
} else {
311-
tracing::debug!("Discarding check result for outdated revision: current: {revision}, result revision: {check_revision}");
322+
tracing::debug!(
323+
"Discarding check result for outdated revision: current: {revision}, result revision: {check_revision}"
324+
);
312325
}
313326

314327
if self.watcher.is_none() {

0 commit comments

Comments
 (0)