Fix comment typos and improve wording (#17166)

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

improve code comments clarity

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

<!-- How was it tested? -->

Signed-off-by: stringscut <stringscut@outlook.jp>
This commit is contained in:
stringscut
2025-12-18 18:47:43 +08:00
committed by GitHub
parent 9360ca7778
commit 9f422e7515
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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))
}
+1 -1
View File
@@ -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;
}
+3 -3
View File
@@ -18,13 +18,13 @@ pub fn shlex_posix(executable: impl AsRef<Path>) -> 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 (<https://linux.die.net/man/1/bash> 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#"'"'"'"#)
+1 -1
View File
@@ -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"]);