From 9f422e75154f577eabfb8893e9ed0da718c7b46e Mon Sep 17 00:00:00 2001 From: stringscut Date: Thu, 18 Dec 2025 18:47:43 +0800 Subject: [PATCH] Fix comment typos and improve wording (#17166) ## Summary improve code comments clarity ## Test Plan Signed-off-by: stringscut --- crates/uv-build-frontend/src/lib.rs | 2 +- crates/uv-client/src/base_client.rs | 2 +- crates/uv-shell/src/shlex.rs | 6 +++--- crates/uv/tests/it/init.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/uv-build-frontend/src/lib.rs b/crates/uv-build-frontend/src/lib.rs index f29be374a..59fe0bdb0 100644 --- a/crates/uv-build-frontend/src/lib.rs +++ b/crates/uv-build-frontend/src/lib.rs @@ -676,7 +676,7 @@ impl SourceBuild { // If no `pyproject.toml` is present, by default, proceed with a PEP 517 build using // the default backend, to match `build`. `pip` uses `setup.py` directly in this - // case, but plans to make PEP 517 builds the default in the future. + // case, but plans to make PEP 517 builds the default in the future. // See: https://github.com/pypa/pip/issues/9175. Ok((DEFAULT_BACKEND.clone(), None)) } diff --git a/crates/uv-client/src/base_client.rs b/crates/uv-client/src/base_client.rs index 991a0eb58..dd60b65a9 100644 --- a/crates/uv-client/src/base_client.rs +++ b/crates/uv-client/src/base_client.rs @@ -1389,7 +1389,7 @@ mod tests { let middleware_client = ClientWithMiddleware::default(); let mut retried = Vec::new(); for status in 100..599 { - // Test all standard status codes and and example for a non-RFC code used in the wild. + // Test all standard status codes and an example for a non-RFC code used in the wild. if StatusCode::from_u16(status)?.canonical_reason().is_none() && status != 420 { continue; } diff --git a/crates/uv-shell/src/shlex.rs b/crates/uv-shell/src/shlex.rs index 5fe9b747e..cdcbd478f 100644 --- a/crates/uv-shell/src/shlex.rs +++ b/crates/uv-shell/src/shlex.rs @@ -18,13 +18,13 @@ pub fn shlex_posix(executable: impl AsRef) -> String { /// Escape a string for being used in single quotes in a POSIX-compatible shell command. /// -/// We want our scripts to support any POSIX shell. There's two kind of quotes in POSIX: +/// We want our scripts to support any POSIX shell. There are two kinds of quotes in POSIX: /// Single and double quotes. In bash, single quotes must not contain another single /// quote, you can't even escape it ( under "QUOTING"). -/// Double quotes have escaping rules different from shell to shell, which we can't do. +/// Double quotes have escaping rules that differ from shell to shell, which we can't handle. /// Bash has `$'\''`, but that's not universal enough. /// -/// As solution, use implicit string concatenations, by putting the single quote into double +/// As a solution, use implicit string concatenations, by putting the single quote into double /// quotes. pub fn escape_posix_for_single_quotes(string: &str) -> String { string.replace('\'', r#"'"'"'"#) diff --git a/crates/uv/tests/it/init.rs b/crates/uv/tests/it/init.rs index 8b72cea96..058b523ff 100644 --- a/crates/uv/tests/it/init.rs +++ b/crates/uv/tests/it/init.rs @@ -2600,7 +2600,7 @@ fn init_existing_environment() -> Result<()> { Ok(()) } -/// Run `uv init`, it should ignore a the Python version from a parent `.venv` +/// Run `uv init`, it should ignore the Python version from a parent `.venv` #[test] fn init_existing_environment_parent() -> Result<()> { let context = TestContext::new_with_versions(&["3.9", "3.12"]);