Use existing index field in PEP 723 scripts (#9238)

## Summary

Purely internal, this setting already exists.
This commit is contained in:
Charlie Marsh 2024-11-19 14:45:12 -05:00 committed by GitHub
parent f49230471c
commit 45eeae61ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1 additions and 5 deletions

1
Cargo.lock generated
View file

@ -5455,7 +5455,6 @@ dependencies = [
"serde",
"thiserror 2.0.3",
"toml",
"uv-distribution-types",
"uv-pep440",
"uv-pep508",
"uv-pypi-types",

View file

@ -11,7 +11,6 @@ doctest = false
workspace = true
[dependencies]
uv-distribution-types = { workspace = true }
uv-pep440 = { workspace = true }
uv-pep508 = { workspace = true }
uv-pypi-types = { workspace = true }

View file

@ -8,7 +8,6 @@ use memchr::memmem::Finder;
use serde::Deserialize;
use thiserror::Error;
use uv_distribution_types::Index;
use uv_pep440::VersionSpecifiers;
use uv_pep508::PackageName;
use uv_pypi_types::VerbatimParsedUrl;
@ -275,7 +274,6 @@ pub struct ToolUv {
pub override_dependencies: Option<Vec<uv_pep508::Requirement<VerbatimParsedUrl>>>,
pub constraint_dependencies: Option<Vec<uv_pep508::Requirement<VerbatimParsedUrl>>>,
pub sources: Option<BTreeMap<PackageName, Sources>>,
pub index: Option<Vec<Index>>,
}
#[derive(Debug, Error)]

View file

@ -243,7 +243,7 @@ pub(crate) async fn run(
.tool
.as_ref()
.and_then(|tool| tool.uv.as_ref())
.and_then(|uv| uv.index.as_deref())
.and_then(|uv| uv.top_level.index.as_deref())
.unwrap_or(&empty),
SourceStrategy::Disabled => &empty,
};