Skip to content

Commit

Permalink
Update pre-commit dependencies (astral-sh#3391)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored May 6, 2024
1 parent 5a8d13a commit c1370ca
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions crates/requirements-txt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
"})?;

Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions crates/uv-auth/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");

// <https://github.com/TrueLayer/reqwest-middleware/blob/abdf1844c37092d323683c2396b7eefda1418d3c/reqwest-retry/src/middleware.rs#L141-L149>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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())?;
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions crates/uv-configuration/src/config_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"}"#);
}
}
2 changes: 1 addition & 1 deletion crates/uv-interpreter/src/managed/downloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl FromStr for PythonDownloadRequest {
type Err = Error;

fn from_str(s: &str) -> Result<Self, Self::Err> {
// 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))
}
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/tests/pip_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions crates/uv/tests/pip_install_scenarios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c1370ca

Please sign in to comment.