mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 10:26:29 +00:00
Move argument normalization into settings construction (#3103)
## Summary No behavior changes, but the idea here is that we move the argument normalization code (e.g., create an `Upgrade` struct from `--upgrade` and `--upgrade-package`) into the `settings.rs` file, where we build the common settings structs. This reduces a lot of the logic and duplication across commands in `main.rs`.
This commit is contained in:
parent
ac9c4e1f38
commit
4a98839c1d
8 changed files with 117 additions and 202 deletions
|
|
@ -23,7 +23,7 @@ pub struct SourceTreeResolver<'a, Context: BuildContext + Send + Sync> {
|
|||
/// The requirements for the project.
|
||||
source_trees: Vec<PathBuf>,
|
||||
/// The extras to include when resolving requirements.
|
||||
extras: &'a ExtrasSpecification<'a>,
|
||||
extras: &'a ExtrasSpecification,
|
||||
/// The hash policy to enforce.
|
||||
hasher: &'a HashStrategy,
|
||||
/// The in-memory index for resolving dependencies.
|
||||
|
|
@ -36,7 +36,7 @@ impl<'a, Context: BuildContext + Send + Sync> SourceTreeResolver<'a, Context> {
|
|||
/// Instantiate a new [`SourceTreeResolver`] for a given set of `source_trees`.
|
||||
pub fn new(
|
||||
source_trees: Vec<PathBuf>,
|
||||
extras: &'a ExtrasSpecification<'a>,
|
||||
extras: &'a ExtrasSpecification,
|
||||
hasher: &'a HashStrategy,
|
||||
context: &'a Context,
|
||||
client: &'a RegistryClient,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue