Update pre-commit dependencies (#3391)

This commit is contained in:
renovate[bot] 2024-05-06 02:18:51 +00:00 committed by GitHub
parent 5a8d13a05a
commit c1370cab1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 23 additions and 23 deletions

View file

@ -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

View file

@ -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

View file

@ -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>
@ -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))

View file

@ -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"}"#);
}
}

View file

@ -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))
}

View file

@ -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]

View file

@ -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,