mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-26 12:09:12 +00:00
Move ExcludeNewer
into its own type (#3041)
## Summary This makes it easier to add (e.g.) JSON Schema derivations to the type. If we have support for other dates in the future, we can generalize it to a `UserDate` or similar.
This commit is contained in:
parent
37a43f4b48
commit
1f626bfc73
12 changed files with 96 additions and 61 deletions
|
@ -3,7 +3,7 @@ use std::path::PathBuf;
|
|||
|
||||
use anstream::println;
|
||||
use anyhow::{Context, Result};
|
||||
use chrono::{DateTime, Utc};
|
||||
|
||||
use clap::{Parser, ValueEnum};
|
||||
use fs_err::File;
|
||||
use itertools::Itertools;
|
||||
|
@ -17,7 +17,7 @@ use uv_configuration::{ConfigSettings, NoBinary, NoBuild, SetupPyStrategy};
|
|||
use uv_dispatch::BuildDispatch;
|
||||
use uv_installer::SitePackages;
|
||||
use uv_interpreter::PythonEnvironment;
|
||||
use uv_resolver::{FlatIndex, InMemoryIndex, Manifest, Options, Resolver};
|
||||
use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex, Manifest, Options, Resolver};
|
||||
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
||||
|
||||
#[derive(ValueEnum, Default, Clone)]
|
||||
|
@ -42,7 +42,7 @@ pub(crate) struct ResolveCliArgs {
|
|||
#[command(flatten)]
|
||||
cache_args: CacheArgs,
|
||||
#[arg(long)]
|
||||
exclude_newer: Option<DateTime<Utc>>,
|
||||
exclude_newer: Option<ExcludeNewer>,
|
||||
#[clap(long, short, env = "UV_INDEX_URL")]
|
||||
index_url: Option<IndexUrl>,
|
||||
#[clap(long, env = "UV_EXTRA_INDEX_URL")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue