Omit URL dependencies from pre-release hints (#4140)

## Summary

Closes https://github.com/astral-sh/uv/issues/4127.
This commit is contained in:
Charlie Marsh 2024-06-07 11:43:50 -07:00 committed by GitHub
parent 7d1b7b99d9
commit 2803a8c475
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -412,8 +412,11 @@ impl PubGrubReportFormatter<'_> {
match derivation_tree {
DerivationTree::External(external) => match external {
External::Custom(package, set, _) | External::NoVersions(package, set) => {
if let PubGrubPackageInner::Package { name, .. } = &**package {
// Check for no versions due to pre-release options
if let PubGrubPackageInner::Package {
name, url: None, ..
} = &**package
{
// Check for no versions due to pre-release options.
if let Some(selector) = selector {
let any_prerelease = set.iter().any(|(start, end)| {
let is_pre1 = match start {
@ -455,7 +458,9 @@ impl PubGrubReportFormatter<'_> {
}
}
}
}
if let PubGrubPackageInner::Package { name, .. } = &**package {
// Check for no versions due to no `--find-links` flat index
if let Some(index_locations) = index_locations {
let no_find_links =