mirror of https://github.com/astral-sh/uv
Remove unnecessary `Deserialize` derives on settings (#7856)
This commit is contained in:
parent
f0659e76cf
commit
90265419b7
|
|
@ -110,7 +110,6 @@ impl Options {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Global settings, relevant to all invocations.
|
/// Global settings, relevant to all invocations.
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Debug, Clone, Default, Deserialize, CombineOptions, OptionsMetadata)]
|
#[derive(Debug, Clone, Default, Deserialize, CombineOptions, OptionsMetadata)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
|
|
@ -229,10 +228,7 @@ pub struct GlobalOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Settings relevant to all installer operations.
|
/// Settings relevant to all installer operations.
|
||||||
#[allow(dead_code)]
|
#[derive(Debug, Clone, Default, CombineOptions)]
|
||||||
#[derive(Debug, Clone, Default, Deserialize, CombineOptions)]
|
|
||||||
#[serde(rename_all = "kebab-case")]
|
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
|
||||||
pub struct InstallerOptions {
|
pub struct InstallerOptions {
|
||||||
pub index_url: Option<IndexUrl>,
|
pub index_url: Option<IndexUrl>,
|
||||||
pub extra_index_url: Option<Vec<IndexUrl>>,
|
pub extra_index_url: Option<Vec<IndexUrl>>,
|
||||||
|
|
@ -256,10 +252,7 @@ pub struct InstallerOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Settings relevant to all resolver operations.
|
/// Settings relevant to all resolver operations.
|
||||||
#[allow(dead_code)]
|
#[derive(Debug, Clone, Default, CombineOptions)]
|
||||||
#[derive(Debug, Clone, Default, Deserialize, CombineOptions)]
|
|
||||||
#[serde(rename_all = "kebab-case")]
|
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
|
||||||
pub struct ResolverOptions {
|
pub struct ResolverOptions {
|
||||||
pub index_url: Option<IndexUrl>,
|
pub index_url: Option<IndexUrl>,
|
||||||
pub extra_index_url: Option<Vec<IndexUrl>>,
|
pub extra_index_url: Option<Vec<IndexUrl>>,
|
||||||
|
|
@ -287,10 +280,7 @@ pub struct ResolverOptions {
|
||||||
|
|
||||||
/// Shared settings, relevant to all operations that must resolve and install dependencies. The
|
/// Shared settings, relevant to all operations that must resolve and install dependencies. The
|
||||||
/// union of [`InstallerOptions`] and [`ResolverOptions`].
|
/// union of [`InstallerOptions`] and [`ResolverOptions`].
|
||||||
#[allow(dead_code)]
|
#[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, CombineOptions, OptionsMetadata)]
|
||||||
#[derive(
|
|
||||||
Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, CombineOptions, OptionsMetadata,
|
|
||||||
)]
|
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
pub struct ResolverInstallerOptions {
|
pub struct ResolverInstallerOptions {
|
||||||
|
|
@ -624,7 +614,6 @@ pub struct ResolverInstallerOptions {
|
||||||
///
|
///
|
||||||
/// These values will be ignored when running commands outside the `uv pip` namespace (e.g.,
|
/// These values will be ignored when running commands outside the `uv pip` namespace (e.g.,
|
||||||
/// `uv lock`, `uvx`).
|
/// `uv lock`, `uvx`).
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Debug, Clone, Default, Deserialize, CombineOptions, OptionsMetadata)]
|
#[derive(Debug, Clone, Default, Deserialize, CombineOptions, OptionsMetadata)]
|
||||||
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
|
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ use uv_pypi_types::{Requirement, VerbatimParsedUrl};
|
||||||
use uv_settings::ToolOptions;
|
use uv_settings::ToolOptions;
|
||||||
|
|
||||||
/// A tool entry.
|
/// A tool entry.
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
#[serde(try_from = "ToolWire", into = "ToolWire")]
|
#[serde(try_from = "ToolWire", into = "ToolWire")]
|
||||||
pub struct Tool {
|
pub struct Tool {
|
||||||
|
|
@ -25,7 +24,7 @@ pub struct Tool {
|
||||||
options: ToolOptions,
|
options: ToolOptions,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
struct ToolWire {
|
struct ToolWire {
|
||||||
requirements: Vec<RequirementWire>,
|
requirements: Vec<RequirementWire>,
|
||||||
python: Option<String>,
|
python: Option<String>,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue