mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Clippy pedantic (#1963)
Address a few pedantic lints lints are separated into separate commits so they can be reviewed individually. I've not added enforcement for any of these lints, but that could be added if desirable.
This commit is contained in:
parent
b052291685
commit
8d721830db
68 changed files with 635 additions and 673 deletions
|
@ -47,10 +47,10 @@ impl PythonRequirement {
|
|||
|
||||
// If the dist is a source distribution, and doesn't support the installed Python
|
||||
// version, return the failing version specifiers, since we won't be able to build it.
|
||||
if matches!(dist.for_installation().dist, Dist::Source(_)) {
|
||||
if !requires_python.contains(self.installed()) {
|
||||
return Some(requires_python);
|
||||
}
|
||||
if matches!(dist.for_installation().dist, Dist::Source(_))
|
||||
&& !requires_python.contains(self.installed())
|
||||
{
|
||||
return Some(requires_python);
|
||||
}
|
||||
|
||||
// Validate the resolved file.
|
||||
|
@ -60,10 +60,10 @@ impl PythonRequirement {
|
|||
// version, return the failing version specifiers, since we won't be able to build it.
|
||||
// This isn't strictly necessary, since if `dist.resolve_metadata()` is a source distribution, it
|
||||
// should be the same file as `dist.install_metadata()` (validated above).
|
||||
if matches!(dist.for_resolution().dist, Dist::Source(_)) {
|
||||
if !requires_python.contains(self.installed()) {
|
||||
return Some(requires_python);
|
||||
}
|
||||
if matches!(dist.for_resolution().dist, Dist::Source(_))
|
||||
&& !requires_python.contains(self.installed())
|
||||
{
|
||||
return Some(requires_python);
|
||||
}
|
||||
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue