Remove additional 'because' (#2849)

## Summary

Is this, perhaps, not totally necessary? It doesn't show up in any
fixtures beyond those that I added recently.

Closes https://github.com/astral-sh/uv/issues/2846.
This commit is contained in:
Charlie Marsh 2024-04-06 10:58:23 -04:00 committed by GitHub
parent 8ffdcced0f
commit 35940cb885
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 17 deletions

View file

@ -429,18 +429,10 @@ impl<
.await? .await?
{ {
Dependencies::Unavailable(reason) => { Dependencies::Unavailable(reason) => {
let message = {
if matches!(package, PubGrubPackage::Root(_)) {
// Including front-matter for the root package is redundant
reason.clone()
} else {
format!("its dependencies are unusable because {reason}")
}
};
state.add_incompatibility(Incompatibility::unavailable( state.add_incompatibility(Incompatibility::unavailable(
package.clone(), package.clone(),
version.clone(), version.clone(),
message, reason.clone(),
)); ));
continue; continue;
} }

View file

@ -4569,10 +4569,9 @@ fn invalid_metadata_requires_python() -> Result<()> {
----- stderr ----- ----- stderr -----
× No solution found when resolving dependencies: × No solution found when resolving dependencies:
Because validation==2.0.0 is unusable because its dependencies are Because validation==2.0.0 is unusable because the package metadata could
unusable because the package metadata could not be parsed and you not be parsed and you require validation==2.0.0, we can conclude that
require validation==2.0.0, we can conclude that the requirements are the requirements are unsatisfiable.
unsatisfiable.
"### "###
); );
@ -4598,10 +4597,9 @@ fn invalid_metadata_multiple_dist_info() -> Result<()> {
----- stderr ----- ----- stderr -----
× No solution found when resolving dependencies: × No solution found when resolving dependencies:
Because validation==3.0.0 is unusable because its dependencies Because validation==3.0.0 is unusable because the package has an invalid
are unusable because the package has an invalid format and you format and you require validation==3.0.0, we can conclude that the
require validation==3.0.0, we can conclude that the requirements are requirements are unsatisfiable.
unsatisfiable.
"### "###
); );

View file

@ -1,2 +1,3 @@
# Artifacts from the build process. # Artifacts from the build process.
*.egg-info/ *.egg-info/
build/