Turn off clippy::struct_excessive_bools rule (#14102)
We always ignore the `clippy::struct_excessive_bools` rule and formerly annotated this at the function level. This PR specifies the allow in `workspace.lints.clippy` in `Cargo.toml`.
This commit is contained in:
@@ -13,7 +13,6 @@ pub trait CompatArgs {
|
||||
/// For example, users often pass `--allow-unsafe`, which is unnecessary with uv. But it's a
|
||||
/// nice user experience to warn, rather than fail, when users pass `--allow-unsafe`.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipCompileCompatArgs {
|
||||
#[clap(long, hide = true)]
|
||||
allow_unsafe: bool,
|
||||
@@ -159,7 +158,6 @@ impl CompatArgs for PipCompileCompatArgs {
|
||||
///
|
||||
/// These represent a subset of the `pip list` interface that uv supports by default.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipListCompatArgs {
|
||||
#[clap(long, hide = true)]
|
||||
disable_pip_version_check: bool,
|
||||
@@ -184,7 +182,6 @@ impl CompatArgs for PipListCompatArgs {
|
||||
///
|
||||
/// These represent a subset of the `pip-sync` interface that uv supports by default.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipSyncCompatArgs {
|
||||
#[clap(short, long, hide = true)]
|
||||
ask: bool,
|
||||
@@ -268,7 +265,6 @@ enum Resolver {
|
||||
///
|
||||
/// These represent a subset of the `virtualenv` interface that uv supports by default.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct VenvCompatArgs {
|
||||
#[clap(long, hide = true)]
|
||||
clear: bool,
|
||||
@@ -327,7 +323,6 @@ impl CompatArgs for VenvCompatArgs {
|
||||
///
|
||||
/// These represent a subset of the `pip install` interface that uv supports by default.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipInstallCompatArgs {
|
||||
#[clap(long, hide = true)]
|
||||
disable_pip_version_check: bool,
|
||||
@@ -361,7 +356,6 @@ impl CompatArgs for PipInstallCompatArgs {
|
||||
///
|
||||
/// These represent a subset of the `pip` interface that exists on all commands.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipGlobalCompatArgs {
|
||||
#[clap(long, hide = true)]
|
||||
disable_pip_version_check: bool,
|
||||
|
||||
@@ -85,7 +85,6 @@ const STYLES: Styles = Styles::styled()
|
||||
disable_version_flag = true
|
||||
)]
|
||||
#[command(styles=STYLES)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
pub command: Box<Commands>,
|
||||
@@ -133,7 +132,6 @@ pub struct TopLevelArgs {
|
||||
|
||||
#[derive(Parser, Debug, Clone)]
|
||||
#[command(next_help_heading = "Global options", next_display_order = 1000)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct GlobalArgs {
|
||||
#[arg(
|
||||
global = true,
|
||||
@@ -526,7 +524,6 @@ pub struct HelpArgs {
|
||||
|
||||
#[derive(Args)]
|
||||
#[command(group = clap::ArgGroup::new("operation"))]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct VersionArgs {
|
||||
/// Set the project version to this value
|
||||
///
|
||||
@@ -657,7 +654,6 @@ pub struct SelfUpdateArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct CacheNamespace {
|
||||
#[command(subcommand)]
|
||||
pub command: CacheCommand,
|
||||
@@ -687,14 +683,12 @@ pub enum CacheCommand {
|
||||
}
|
||||
|
||||
#[derive(Args, Debug)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct CleanArgs {
|
||||
/// The packages to remove from the cache.
|
||||
pub package: Vec<PackageName>,
|
||||
}
|
||||
|
||||
#[derive(Args, Debug)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PruneArgs {
|
||||
/// Optimize the cache for persistence in a continuous integration environment, like GitHub
|
||||
/// Actions.
|
||||
@@ -714,7 +708,6 @@ pub struct PruneArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipNamespace {
|
||||
#[command(subcommand)]
|
||||
pub command: PipCommand,
|
||||
@@ -1095,7 +1088,6 @@ fn parse_maybe_string(input: &str) -> Result<Maybe<String>, String> {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
#[command(group = clap::ArgGroup::new("sources").required(true).multiple(true))]
|
||||
pub struct PipCompileArgs {
|
||||
/// Include all packages listed in the given `requirements.in` files.
|
||||
@@ -1443,7 +1435,6 @@ pub struct PipCompileArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipSyncArgs {
|
||||
/// Include all packages listed in the given `requirements.txt` files.
|
||||
///
|
||||
@@ -1700,7 +1691,6 @@ pub struct PipSyncArgs {
|
||||
|
||||
#[derive(Args)]
|
||||
#[command(group = clap::ArgGroup::new("sources").required(true).multiple(true))]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipInstallArgs {
|
||||
/// Install all listed packages.
|
||||
///
|
||||
@@ -2015,7 +2005,6 @@ pub struct PipInstallArgs {
|
||||
|
||||
#[derive(Args)]
|
||||
#[command(group = clap::ArgGroup::new("sources").required(true).multiple(true))]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipUninstallArgs {
|
||||
/// Uninstall all listed packages.
|
||||
#[arg(group = "sources")]
|
||||
@@ -2104,7 +2093,6 @@ pub struct PipUninstallArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipFreezeArgs {
|
||||
/// Exclude any editable packages from output.
|
||||
#[arg(long)]
|
||||
@@ -2159,7 +2147,6 @@ pub struct PipFreezeArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipListArgs {
|
||||
/// Only include editable projects.
|
||||
#[arg(short, long)]
|
||||
@@ -2235,7 +2222,6 @@ pub struct PipListArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipCheckArgs {
|
||||
/// The Python interpreter for which packages should be checked.
|
||||
///
|
||||
@@ -2271,7 +2257,6 @@ pub struct PipCheckArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipShowArgs {
|
||||
/// The package(s) to display.
|
||||
pub package: Vec<PackageName>,
|
||||
@@ -2325,7 +2310,6 @@ pub struct PipShowArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PipTreeArgs {
|
||||
/// Show the version constraint(s) imposed on each package.
|
||||
#[arg(long)]
|
||||
@@ -2382,7 +2366,6 @@ pub struct PipTreeArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct BuildArgs {
|
||||
/// The directory from which distributions should be built, or a source
|
||||
/// distribution archive to build into a wheel.
|
||||
@@ -2529,7 +2512,6 @@ pub struct BuildArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct VenvArgs {
|
||||
/// The Python interpreter to use for the virtual environment.
|
||||
///
|
||||
@@ -2725,7 +2707,6 @@ pub enum AuthorFrom {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct InitArgs {
|
||||
/// The path to use for the project/script.
|
||||
///
|
||||
@@ -2883,7 +2864,6 @@ pub struct InitArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct RunArgs {
|
||||
/// Include optional dependencies from the specified extra name.
|
||||
///
|
||||
@@ -3170,7 +3150,6 @@ pub struct RunArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct SyncArgs {
|
||||
/// Include optional dependencies from the specified extra name.
|
||||
///
|
||||
@@ -3427,7 +3406,6 @@ pub struct SyncArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct LockArgs {
|
||||
/// Check if the lockfile is up-to-date.
|
||||
///
|
||||
@@ -3489,7 +3467,6 @@ pub struct LockArgs {
|
||||
|
||||
#[derive(Args)]
|
||||
#[command(group = clap::ArgGroup::new("sources").required(true).multiple(true))]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct AddArgs {
|
||||
/// The packages to add, as PEP 508 requirements (e.g., `ruff==0.5.0`).
|
||||
#[arg(group = "sources")]
|
||||
@@ -3674,7 +3651,6 @@ pub struct AddArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct RemoveArgs {
|
||||
/// The names of the dependencies to remove (e.g., `ruff`).
|
||||
#[arg(required = true)]
|
||||
@@ -3769,7 +3745,6 @@ pub struct RemoveArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct TreeArgs {
|
||||
/// Show a platform-independent dependency tree.
|
||||
///
|
||||
@@ -3909,7 +3884,6 @@ pub struct TreeArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ExportArgs {
|
||||
/// The format to which `uv.lock` should be exported.
|
||||
///
|
||||
@@ -4124,7 +4098,6 @@ pub struct ExportArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolNamespace {
|
||||
#[command(subcommand)]
|
||||
pub command: ToolCommand,
|
||||
@@ -4217,7 +4190,6 @@ pub enum ToolCommand {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolRunArgs {
|
||||
/// The command to run.
|
||||
///
|
||||
@@ -4336,7 +4308,6 @@ pub struct UvxArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolInstallArgs {
|
||||
/// The package to install commands from.
|
||||
pub package: String,
|
||||
@@ -4425,7 +4396,6 @@ pub struct ToolInstallArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolListArgs {
|
||||
/// Whether to display the path to each tool environment and installed executable.
|
||||
#[arg(long)]
|
||||
@@ -4452,7 +4422,6 @@ pub struct ToolListArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolDirArgs {
|
||||
/// Show the directory into which `uv tool` will install executables.
|
||||
///
|
||||
@@ -4471,7 +4440,6 @@ pub struct ToolDirArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolUninstallArgs {
|
||||
/// The name of the tool to uninstall.
|
||||
#[arg(required = true)]
|
||||
@@ -4483,7 +4451,6 @@ pub struct ToolUninstallArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolUpgradeArgs {
|
||||
/// The name of the tool to upgrade, along with an optional version specifier.
|
||||
#[arg(required = true)]
|
||||
@@ -4713,7 +4680,6 @@ pub struct ToolUpgradeArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonNamespace {
|
||||
#[command(subcommand)]
|
||||
pub command: PythonCommand,
|
||||
@@ -4793,7 +4759,6 @@ pub enum PythonCommand {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonListArgs {
|
||||
/// A Python request to filter by.
|
||||
///
|
||||
@@ -4848,7 +4813,6 @@ pub struct PythonListArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonDirArgs {
|
||||
/// Show the directory into which `uv python` will install Python executables.
|
||||
///
|
||||
@@ -4866,7 +4830,6 @@ pub struct PythonDirArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonInstallArgs {
|
||||
/// The directory to store the Python installation in.
|
||||
///
|
||||
@@ -4945,7 +4908,6 @@ pub struct PythonInstallArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonUninstallArgs {
|
||||
/// The directory where the Python was installed.
|
||||
#[arg(long, short, env = EnvVars::UV_PYTHON_INSTALL_DIR)]
|
||||
@@ -4963,7 +4925,6 @@ pub struct PythonUninstallArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonFindArgs {
|
||||
/// The Python request.
|
||||
///
|
||||
@@ -5012,7 +4973,6 @@ pub struct PythonFindArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct PythonPinArgs {
|
||||
/// The Python version request.
|
||||
///
|
||||
@@ -5061,7 +5021,6 @@ pub struct PythonPinArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct GenerateShellCompletionArgs {
|
||||
/// The shell to generate the completion script for
|
||||
pub shell: clap_complete_command::Shell,
|
||||
@@ -5100,7 +5059,6 @@ pub struct GenerateShellCompletionArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct IndexArgs {
|
||||
/// The URLs to use when resolving dependencies, in addition to the default index.
|
||||
///
|
||||
@@ -5175,7 +5133,6 @@ pub struct IndexArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct RefreshArgs {
|
||||
/// Refresh all cached data.
|
||||
#[arg(
|
||||
@@ -5201,7 +5158,6 @@ pub struct RefreshArgs {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct BuildOptionsArgs {
|
||||
/// Don't build source distributions.
|
||||
///
|
||||
@@ -5257,7 +5213,6 @@ pub struct BuildOptionsArgs {
|
||||
|
||||
/// Arguments that are used by commands that need to install (but not resolve) packages.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct InstallerArgs {
|
||||
#[command(flatten)]
|
||||
pub index_args: IndexArgs,
|
||||
@@ -5399,7 +5354,6 @@ pub struct InstallerArgs {
|
||||
|
||||
/// Arguments that are used by commands that need to resolve (but not install) packages.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ResolverArgs {
|
||||
#[command(flatten)]
|
||||
pub index_args: IndexArgs,
|
||||
@@ -5566,7 +5520,6 @@ pub struct ResolverArgs {
|
||||
|
||||
/// Arguments that are used by commands that need to resolve and install packages.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ResolverInstallerArgs {
|
||||
#[command(flatten)]
|
||||
pub index_args: IndexArgs,
|
||||
@@ -5783,7 +5736,6 @@ pub struct ResolverInstallerArgs {
|
||||
|
||||
/// Arguments that are used by commands that need to fetch from the Simple API.
|
||||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct FetchArgs {
|
||||
#[command(flatten)]
|
||||
pub index_args: IndexArgs,
|
||||
|
||||
Reference in New Issue
Block a user