mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
[red-knot] Add argfile and windows glob path support (#16353)
This commit is contained in:
parent
d895ee0014
commit
fd7b3c83ad
3 changed files with 8 additions and 1 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2409,6 +2409,7 @@ name = "red_knot"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"argfile",
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
"colored 3.0.0",
|
"colored 3.0.0",
|
||||||
|
@ -2433,6 +2434,7 @@ dependencies = [
|
||||||
"tracing-flame",
|
"tracing-flame",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
"tracing-tree",
|
"tracing-tree",
|
||||||
|
"wild",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -19,6 +19,7 @@ ruff_db = { workspace = true, features = ["os", "cache"] }
|
||||||
ruff_python_ast = { workspace = true }
|
ruff_python_ast = { workspace = true }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
|
argfile = { workspace = true }
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
clap = { workspace = true, features = ["wrap_help"] }
|
clap = { workspace = true, features = ["wrap_help"] }
|
||||||
colored = { workspace = true }
|
colored = { workspace = true }
|
||||||
|
@ -31,6 +32,7 @@ tracing = { workspace = true, features = ["release_max_level_debug"] }
|
||||||
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
|
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
|
||||||
tracing-flame = { workspace = true }
|
tracing-flame = { workspace = true }
|
||||||
tracing-tree = { workspace = true }
|
tracing-tree = { workspace = true }
|
||||||
|
wild = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ruff_db = { workspace = true, features = ["testing"] }
|
ruff_db = { workspace = true, features = ["testing"] }
|
||||||
|
|
|
@ -56,7 +56,10 @@ pub fn main() -> ExitStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run() -> anyhow::Result<ExitStatus> {
|
fn run() -> anyhow::Result<ExitStatus> {
|
||||||
let args = Args::parse_from(std::env::args());
|
let args = wild::args_os();
|
||||||
|
let args = argfile::expand_args_from(args, argfile::parse_fromfile, argfile::PREFIX)
|
||||||
|
.context("Failed to read CLI arguments from file")?;
|
||||||
|
let args = Args::parse_from(args);
|
||||||
|
|
||||||
match args.command {
|
match args.command {
|
||||||
Command::Server => run_server().map(|()| ExitStatus::Success),
|
Command::Server => run_server().map(|()| ExitStatus::Success),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue