Simplify version ranges reported for unavailable packages (#6155)

Now that these incompatibilities are collected into a single range
(https://github.com/astral-sh/uv/pull/6154), we can simplify the range
using the known available versions to reduce verbosity.
This commit is contained in:
Zanie Blue
2024-08-16 15:56:45 -05:00
committed by GitHub
parent 3a46e48f93
commit e1a8beb64b
3 changed files with 9 additions and 43 deletions
+2 -1
View File
@@ -120,9 +120,10 @@ impl ReportFormatter<PubGrubPackage, Range<Version>, UnavailableReason>
format!("{}{reason}", Padded::new("", &package, " "))
}
UnavailableReason::Version(reason) => {
let set = self.simplify_set(set, package);
format!(
"{}{reason}",
Padded::new("", &self.compatible_range(package, set), " ")
Padded::new("", &self.compatible_range(package, &set), " ")
)
}
}