From c1370cab1b153a3d45c82cc2afe414cf2e1b2c82 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 02:18:51 +0000 Subject: [PATCH] Update pre-commit dependencies (#3391) --- .pre-commit-config.yaml | 4 ++-- crates/requirements-txt/src/lib.rs | 20 +++++++++---------- crates/uv-auth/src/middleware.rs | 10 +++++----- .../uv-configuration/src/config_settings.rs | 4 ++-- .../uv-interpreter/src/managed/downloads.rs | 2 +- crates/uv/tests/pip_install.rs | 2 +- crates/uv/tests/pip_install_scenarios.rs | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da1bbed01..c308e8cec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: validate-pyproject - repo: https://github.com/crate-ci/typos - rev: v1.20.10 + rev: v1.21.0 hooks: - id: typos @@ -32,7 +32,7 @@ repos: types_or: [yaml, json5] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.2 + rev: v0.4.3 hooks: - id: ruff-format - id: ruff diff --git a/crates/requirements-txt/src/lib.rs b/crates/requirements-txt/src/lib.rs index 822965ce9..f2c13c546 100644 --- a/crates/requirements-txt/src/lib.rs +++ b/crates/requirements-txt/src/lib.rs @@ -2178,7 +2178,7 @@ mod test { let requirements_txt = temp_dir.child("requirements.txt"); requirements_txt.write_str(indoc! {" numpy>=1,<2 - --borken + --broken tqdm "})?; @@ -2207,15 +2207,15 @@ mod test { Ok(()) } - #[test_case("numpy>=1,<2\n @-borken\ntqdm", "2:4"; "ASCII Character with LF")] - #[test_case("numpy>=1,<2\r\n #-borken\ntqdm", "2:4"; "ASCII Character with CRLF")] - #[test_case("numpy>=1,<2\n \n-borken\ntqdm", "3:1"; "ASCII Character LF then LF")] - #[test_case("numpy>=1,<2\n \r-borken\ntqdm", "3:1"; "ASCII Character LF then CR but no LF")] - #[test_case("numpy>=1,<2\n \r\n-borken\ntqdm", "3:1"; "ASCII Character LF then CRLF")] - #[test_case("numpy>=1,<2\n 🚀-borken\ntqdm", "2:4"; "Emoji (Wide) Character")] - #[test_case("numpy>=1,<2\n 中-borken\ntqdm", "2:4"; "Fullwidth character")] - #[test_case("numpy>=1,<2\n e\u{0301}-borken\ntqdm", "2:5"; "Two codepoints")] - #[test_case("numpy>=1,<2\n a\u{0300}\u{0316}-borken\ntqdm", "2:6"; "Three codepoints")] + #[test_case("numpy>=1,<2\n @-broken\ntqdm", "2:4"; "ASCII Character with LF")] + #[test_case("numpy>=1,<2\r\n #-broken\ntqdm", "2:4"; "ASCII Character with CRLF")] + #[test_case("numpy>=1,<2\n \n-broken\ntqdm", "3:1"; "ASCII Character LF then LF")] + #[test_case("numpy>=1,<2\n \r-broken\ntqdm", "3:1"; "ASCII Character LF then CR but no LF")] + #[test_case("numpy>=1,<2\n \r\n-broken\ntqdm", "3:1"; "ASCII Character LF then CRLF")] + #[test_case("numpy>=1,<2\n 🚀-broken\ntqdm", "2:4"; "Emoji (Wide) Character")] + #[test_case("numpy>=1,<2\n 中-broken\ntqdm", "2:4"; "Fullwidth character")] + #[test_case("numpy>=1,<2\n e\u{0301}-broken\ntqdm", "2:5"; "Two codepoints")] + #[test_case("numpy>=1,<2\n a\u{0300}\u{0316}-broken\ntqdm", "2:6"; "Three codepoints")] fn test_calculate_line_column_pair(input: &str, expected: &str) { let mut s = Scanner::new(input); // Place cursor right after the character we want to test diff --git a/crates/uv-auth/src/middleware.rs b/crates/uv-auth/src/middleware.rs index e5e993442..0ba409bdb 100644 --- a/crates/uv-auth/src/middleware.rs +++ b/crates/uv-auth/src/middleware.rs @@ -191,7 +191,7 @@ impl Middleware for AuthMiddleware { .as_ref() .is_some_and(|credentials| credentials.username().is_some()); - // Otherise, attempt an anonymous request + // Otherwise, attempt an anonymous request trace!("Attempting unauthenticated request for {url}"); // @@ -322,7 +322,7 @@ impl AuthMiddleware { if credentials.is_some() { trace!("Using credentials from previous fetch for {url}"); } else { - trace!("Skipping fetch of credentails for {url}, previous attempt failed"); + trace!("Skipping fetch of credentials for {url}, previous attempt failed"); }; return credentials; @@ -714,7 +714,7 @@ mod tests { assert_eq!( client.get(server.uri()).send().await?.status(), 401, - "Credentials should not be pulled from the netrc file due to host mistmatch" + "Credentials should not be pulled from the netrc file due to host mismatch" ); let mut url = Url::parse(&server.uri())?; @@ -1031,7 +1031,7 @@ mod tests { .await; // Create a third, public prefix - // It will throw a 401 if it recieves credentials + // It will throw a 401 if it receives credentials Mock::given(method("GET")) .and(path_regex("/prefix_3.*")) .and(basic_auth(username_1, password_1)) @@ -1154,7 +1154,7 @@ mod tests { .await; // Create a third, public prefix - // It will throw a 401 if it recieves credentials + // It will throw a 401 if it receives credentials Mock::given(method("GET")) .and(path_regex("/prefix_3.*")) .and(basic_auth(username_1, password_1)) diff --git a/crates/uv-configuration/src/config_settings.rs b/crates/uv-configuration/src/config_settings.rs index 7f08d9af7..4c73f9e14 100644 --- a/crates/uv-configuration/src/config_settings.rs +++ b/crates/uv-configuration/src/config_settings.rs @@ -228,8 +228,8 @@ mod tests { let mut settings = ConfigSettings::default(); settings.0.insert( "key".to_string(), - ConfigSettingValue::String("val\\1 {}ue".to_string()), + ConfigSettingValue::String("val\\1 {}value".to_string()), ); - assert_eq!(settings.escape_for_python(), r#"{"key":"val\\1 {}ue"}"#); + assert_eq!(settings.escape_for_python(), r#"{"key":"val\\1 {}value"}"#); } } diff --git a/crates/uv-interpreter/src/managed/downloads.rs b/crates/uv-interpreter/src/managed/downloads.rs index 7f210aec7..1b4c9b106 100644 --- a/crates/uv-interpreter/src/managed/downloads.rs +++ b/crates/uv-interpreter/src/managed/downloads.rs @@ -133,7 +133,7 @@ impl FromStr for PythonDownloadRequest { type Err = Error; fn from_str(s: &str) -> Result { - // TOOD(zanieb): Implement parsing of additional request parts + // TODO(zanieb): Implement parsing of additional request parts let version = PythonVersion::from_str(s).map_err(Error::InvalidPythonVersion)?; Ok(Self::new(Some(version), None, None, None, None)) } diff --git a/crates/uv/tests/pip_install.rs b/crates/uv/tests/pip_install.rs index 069293652..ec18e3cd2 100644 --- a/crates/uv/tests/pip_install.rs +++ b/crates/uv/tests/pip_install.rs @@ -4638,7 +4638,7 @@ fn tool_uv_sources() -> Result<()> { "boltons==24.0.0" ] dont_install_me = [ - "borken @ https://example.org/does/not/exist" + "broken @ https://example.org/does/not/exist" ] [tool.uv.sources] diff --git a/crates/uv/tests/pip_install_scenarios.rs b/crates/uv/tests/pip_install_scenarios.rs index f4b8206b4..789ec3a44 100644 --- a/crates/uv/tests/pip_install_scenarios.rs +++ b/crates/uv/tests/pip_install_scenarios.rs @@ -501,7 +501,7 @@ fn dependency_excludes_range_of_compatible_versions() { /// There is a non-contiguous range of compatible versions for the requested package /// `a`, but another dependency `c` excludes the range. This is the same as /// `dependency-excludes-range-of-compatible-versions` but some of the versions of -/// `a` are incompatible for another reason e.g. dependency on non-existant package +/// `a` are incompatible for another reason e.g. dependency on non-existent package /// `d`. /// /// ```text @@ -3530,7 +3530,7 @@ fn package_only_prereleases_boundary() { "###); // Since there are only prerelease versions of `a` available, a prerelease is - // allowed. Since the user did not explictly request a pre-release, pre-releases at + // allowed. Since the user did not explicitly request a pre-release, pre-releases at // the boundary should not be selected. assert_installed( &context.venv,