mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Disable Clippy's too-many-arguments
rule (#4663)
## Summary We allow this constantly, I think it's just too pedantic for us.
This commit is contained in:
parent
b4c53fd15f
commit
ac87fd4006
24 changed files with 2 additions and 30 deletions
|
@ -179,6 +179,7 @@ module_name_repetitions = "allow"
|
||||||
must_use_candidate = "allow"
|
must_use_candidate = "allow"
|
||||||
similar_names = "allow"
|
similar_names = "allow"
|
||||||
too_many_lines = "allow"
|
too_many_lines = "allow"
|
||||||
|
too_many_arguments = "allow"
|
||||||
# Disallowed restriction lints
|
# Disallowed restriction lints
|
||||||
print_stdout = "warn"
|
print_stdout = "warn"
|
||||||
print_stderr = "warn"
|
print_stderr = "warn"
|
||||||
|
|
|
@ -681,7 +681,6 @@ impl MarkerEnvironment {
|
||||||
python_version,
|
python_version,
|
||||||
sys_platform
|
sys_platform
|
||||||
))]
|
))]
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn py_new(
|
fn py_new(
|
||||||
implementation_name: &str,
|
implementation_name: &str,
|
||||||
implementation_version: &str,
|
implementation_version: &str,
|
||||||
|
|
|
@ -398,7 +398,6 @@ impl SourceBuild {
|
||||||
/// contents from an archive if necessary.
|
/// contents from an archive if necessary.
|
||||||
///
|
///
|
||||||
/// `source_dist` is for error reporting only.
|
/// `source_dist` is for error reporting only.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub async fn setup(
|
pub async fn setup(
|
||||||
source: &Path,
|
source: &Path,
|
||||||
subdirectory: Option<&Path>,
|
subdirectory: Option<&Path>,
|
||||||
|
@ -901,7 +900,6 @@ fn escape_path_for_python(path: &Path) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Not a method because we call it before the builder is completely initialized
|
/// Not a method because we call it before the builder is completely initialized
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
async fn create_pep517_build_environment(
|
async fn create_pep517_build_environment(
|
||||||
runner: &PythonRunner,
|
runner: &PythonRunner,
|
||||||
source_tree: &Path,
|
source_tree: &Path,
|
||||||
|
|
|
@ -54,7 +54,6 @@ pub struct BuildDispatch<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> BuildDispatch<'a> {
|
impl<'a> BuildDispatch<'a> {
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
client: &'a RegistryClient,
|
client: &'a RegistryClient,
|
||||||
cache: &'a Cache,
|
cache: &'a Cache,
|
||||||
|
|
|
@ -433,7 +433,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build a source distribution from a remote URL.
|
/// Build a source distribution from a remote URL.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
async fn url<'data>(
|
async fn url<'data>(
|
||||||
&self,
|
&self,
|
||||||
source: &BuildableSource<'data>,
|
source: &BuildableSource<'data>,
|
||||||
|
@ -505,7 +504,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
||||||
///
|
///
|
||||||
/// If the build backend supports `prepare_metadata_for_build_wheel`, this method will avoid
|
/// If the build backend supports `prepare_metadata_for_build_wheel`, this method will avoid
|
||||||
/// building the wheel.
|
/// building the wheel.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
async fn url_metadata<'data>(
|
async fn url_metadata<'data>(
|
||||||
&self,
|
&self,
|
||||||
source: &BuildableSource<'data>,
|
source: &BuildableSource<'data>,
|
||||||
|
|
|
@ -50,7 +50,6 @@ impl<'a> Planner<'a> {
|
||||||
/// The install plan will also respect the required hashes, such that it will never return a
|
/// The install plan will also respect the required hashes, such that it will never return a
|
||||||
/// cached distribution that does not match the required hash. Like pip, though, it _will_
|
/// cached distribution that does not match the required hash. Like pip, though, it _will_
|
||||||
/// return an _installed_ distribution that does not match the required hash.
|
/// return an _installed_ distribution that does not match the required hash.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn build(
|
pub fn build(
|
||||||
self,
|
self,
|
||||||
mut site_packages: SitePackages,
|
mut site_packages: SitePackages,
|
||||||
|
|
|
@ -50,7 +50,6 @@ pub struct Manifest {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Manifest {
|
impl Manifest {
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
requirements: Vec<Requirement>,
|
requirements: Vec<Requirement>,
|
||||||
constraints: Constraints,
|
constraints: Constraints,
|
||||||
|
|
|
@ -64,7 +64,7 @@ impl<'a> From<&'a ResolutionGraph> for DisplayResolutionGraph<'a> {
|
||||||
|
|
||||||
impl<'a> DisplayResolutionGraph<'a> {
|
impl<'a> DisplayResolutionGraph<'a> {
|
||||||
/// Create a new [`DisplayResolutionGraph`] for the given graph.
|
/// Create a new [`DisplayResolutionGraph`] for the given graph.
|
||||||
#[allow(clippy::fn_params_excessive_bools, clippy::too_many_arguments)]
|
#[allow(clippy::fn_params_excessive_bools)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
underlying: &'a ResolutionGraph,
|
underlying: &'a ResolutionGraph,
|
||||||
marker_env: Option<&'a MarkerEnvironment>,
|
marker_env: Option<&'a MarkerEnvironment>,
|
||||||
|
|
|
@ -52,7 +52,6 @@ pub(crate) enum ResolutionGraphNode {
|
||||||
|
|
||||||
impl ResolutionGraph {
|
impl ResolutionGraph {
|
||||||
/// Create a new graph from the resolved PubGrub state.
|
/// Create a new graph from the resolved PubGrub state.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) fn from_state(
|
pub(crate) fn from_state(
|
||||||
requirements: &[Requirement],
|
requirements: &[Requirement],
|
||||||
constraints: &Constraints,
|
constraints: &Constraints,
|
||||||
|
|
|
@ -137,7 +137,6 @@ impl<'a, Context: BuildContext, InstalledPackages: InstalledPackagesProvider>
|
||||||
/// When a marker environment is provided, the resolver is in
|
/// When a marker environment is provided, the resolver is in
|
||||||
/// "non-universal" mode, which corresponds to standard `pip` behavior that
|
/// "non-universal" mode, which corresponds to standard `pip` behavior that
|
||||||
/// works only for a specific marker environment.
|
/// works only for a specific marker environment.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
manifest: Manifest,
|
manifest: Manifest,
|
||||||
options: Options,
|
options: Options,
|
||||||
|
@ -180,7 +179,6 @@ impl<Provider: ResolverProvider, InstalledPackages: InstalledPackagesProvider>
|
||||||
Resolver<Provider, InstalledPackages>
|
Resolver<Provider, InstalledPackages>
|
||||||
{
|
{
|
||||||
/// Initialize a new resolver using a user provided backend.
|
/// Initialize a new resolver using a user provided backend.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn new_custom_io(
|
pub fn new_custom_io(
|
||||||
manifest: Manifest,
|
manifest: Manifest,
|
||||||
options: Options,
|
options: Options,
|
||||||
|
|
|
@ -86,7 +86,6 @@ pub struct DefaultResolverProvider<'a, Context: BuildContext> {
|
||||||
|
|
||||||
impl<'a, Context: BuildContext> DefaultResolverProvider<'a, Context> {
|
impl<'a, Context: BuildContext> DefaultResolverProvider<'a, Context> {
|
||||||
/// Reads the flat index entries and builds the provider.
|
/// Reads the flat index entries and builds the provider.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
fetcher: DistributionDatabase<'a, Context>,
|
fetcher: DistributionDatabase<'a, Context>,
|
||||||
flat_index: &'a FlatIndex,
|
flat_index: &'a FlatIndex,
|
||||||
|
|
|
@ -40,7 +40,6 @@ impl VersionMap {
|
||||||
///
|
///
|
||||||
/// PEP 592: <https://peps.python.org/pep-0592/#warehouse-pypi-implementation-notes>
|
/// PEP 592: <https://peps.python.org/pep-0592/#warehouse-pypi-implementation-notes>
|
||||||
#[instrument(skip_all, fields(package_name))]
|
#[instrument(skip_all, fields(package_name))]
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) fn from_metadata(
|
pub(crate) fn from_metadata(
|
||||||
simple_metadata: OwnedArchive<SimpleMetadata>,
|
simple_metadata: OwnedArchive<SimpleMetadata>,
|
||||||
package_name: &PackageName,
|
package_name: &PackageName,
|
||||||
|
@ -489,7 +488,6 @@ impl VersionMapLazy {
|
||||||
SourceDistCompatibility::Compatible(hash)
|
SourceDistCompatibility::Compatible(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn wheel_compatibility(
|
fn wheel_compatibility(
|
||||||
&self,
|
&self,
|
||||||
filename: &WheelFilename,
|
filename: &WheelFilename,
|
||||||
|
|
|
@ -73,7 +73,6 @@ pub(crate) async fn read_requirements(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resolve a set of requirements, similar to running `pip compile`.
|
/// Resolve a set of requirements, similar to running `pip compile`.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn resolve<InstalledPackages: InstalledPackagesProvider>(
|
pub(crate) async fn resolve<InstalledPackages: InstalledPackagesProvider>(
|
||||||
requirements: Vec<UnresolvedRequirementSpecification>,
|
requirements: Vec<UnresolvedRequirementSpecification>,
|
||||||
constraints: Vec<Requirement>,
|
constraints: Vec<Requirement>,
|
||||||
|
@ -278,7 +277,6 @@ pub(crate) enum Modifications {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Install a set of requirements into the current environment.
|
/// Install a set of requirements into the current environment.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn install(
|
pub(crate) async fn install(
|
||||||
resolution: &Resolution,
|
resolution: &Resolution,
|
||||||
site_packages: SitePackages,
|
site_packages: SitePackages,
|
||||||
|
|
|
@ -18,7 +18,6 @@ use crate::commands::ExitStatus;
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
||||||
/// Display the installed packages in the current environment as a dependency tree.
|
/// Display the installed packages in the current environment as a dependency tree.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) fn pip_tree(
|
pub(crate) fn pip_tree(
|
||||||
depth: u8,
|
depth: u8,
|
||||||
prune: Vec<PackageName>,
|
prune: Vec<PackageName>,
|
||||||
|
|
|
@ -22,7 +22,6 @@ use crate::commands::{elapsed, ExitStatus};
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
||||||
/// Uninstall packages from the current environment.
|
/// Uninstall packages from the current environment.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn pip_uninstall(
|
pub(crate) async fn pip_uninstall(
|
||||||
sources: &[RequirementsSource],
|
sources: &[RequirementsSource],
|
||||||
python: Option<String>,
|
python: Option<String>,
|
||||||
|
|
|
@ -23,7 +23,6 @@ use crate::printer::Printer;
|
||||||
use crate::settings::{ResolverSettings, ResolverSettingsRef};
|
use crate::settings::{ResolverSettings, ResolverSettingsRef};
|
||||||
|
|
||||||
/// Resolve the project requirements into a lockfile.
|
/// Resolve the project requirements into a lockfile.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn lock(
|
pub(crate) async fn lock(
|
||||||
python: Option<String>,
|
python: Option<String>,
|
||||||
settings: ResolverSettings,
|
settings: ResolverSettings,
|
||||||
|
@ -82,7 +81,6 @@ pub(crate) async fn lock(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lock the project requirements into a lockfile.
|
/// Lock the project requirements into a lockfile.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(super) async fn do_lock(
|
pub(super) async fn do_lock(
|
||||||
workspace: &Workspace,
|
workspace: &Workspace,
|
||||||
interpreter: &Interpreter,
|
interpreter: &Interpreter,
|
||||||
|
|
|
@ -278,7 +278,6 @@ pub(crate) async fn init_environment(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update a [`PythonEnvironment`] to satisfy a set of [`RequirementsSource`]s.
|
/// Update a [`PythonEnvironment`] to satisfy a set of [`RequirementsSource`]s.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn update_environment(
|
pub(crate) async fn update_environment(
|
||||||
venv: PythonEnvironment,
|
venv: PythonEnvironment,
|
||||||
requirements: &[RequirementsSource],
|
requirements: &[RequirementsSource],
|
||||||
|
|
|
@ -16,7 +16,6 @@ use crate::printer::Printer;
|
||||||
use crate::settings::{InstallerSettings, ResolverSettings};
|
use crate::settings::{InstallerSettings, ResolverSettings};
|
||||||
|
|
||||||
/// Remove one or more packages from the project requirements.
|
/// Remove one or more packages from the project requirements.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn remove(
|
pub(crate) async fn remove(
|
||||||
requirements: Vec<PackageName>,
|
requirements: Vec<PackageName>,
|
||||||
dependency_type: DependencyType,
|
dependency_type: DependencyType,
|
||||||
|
|
|
@ -25,7 +25,6 @@ use crate::printer::Printer;
|
||||||
use crate::settings::ResolverInstallerSettings;
|
use crate::settings::ResolverInstallerSettings;
|
||||||
|
|
||||||
/// Run a command.
|
/// Run a command.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn run(
|
pub(crate) async fn run(
|
||||||
extras: ExtrasSpecification,
|
extras: ExtrasSpecification,
|
||||||
dev: bool,
|
dev: bool,
|
||||||
|
|
|
@ -19,7 +19,6 @@ use crate::printer::Printer;
|
||||||
use crate::settings::{InstallerSettings, InstallerSettingsRef};
|
use crate::settings::{InstallerSettings, InstallerSettingsRef};
|
||||||
|
|
||||||
/// Sync the project environment.
|
/// Sync the project environment.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn sync(
|
pub(crate) async fn sync(
|
||||||
extras: ExtrasSpecification,
|
extras: ExtrasSpecification,
|
||||||
dev: bool,
|
dev: bool,
|
||||||
|
@ -82,7 +81,6 @@ pub(crate) async fn sync(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sync a lockfile with an environment.
|
/// Sync a lockfile with an environment.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(super) async fn do_sync(
|
pub(super) async fn do_sync(
|
||||||
project: &VirtualProject,
|
project: &VirtualProject,
|
||||||
venv: &PythonEnvironment,
|
venv: &PythonEnvironment,
|
||||||
|
|
|
@ -28,7 +28,6 @@ use crate::printer::Printer;
|
||||||
use crate::settings::ResolverInstallerSettings;
|
use crate::settings::ResolverInstallerSettings;
|
||||||
|
|
||||||
/// Install a tool.
|
/// Install a tool.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn install(
|
pub(crate) async fn install(
|
||||||
package: String,
|
package: String,
|
||||||
from: Option<String>,
|
from: Option<String>,
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::commands::ExitStatus;
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
||||||
/// List installed tools.
|
/// List installed tools.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn list(preview: PreviewMode, printer: Printer) -> Result<ExitStatus> {
|
pub(crate) async fn list(preview: PreviewMode, printer: Printer) -> Result<ExitStatus> {
|
||||||
if preview.is_disabled() {
|
if preview.is_disabled() {
|
||||||
warn_user_once!("`uv tool list` is experimental and may change without warning.");
|
warn_user_once!("`uv tool list` is experimental and may change without warning.");
|
||||||
|
|
|
@ -25,7 +25,6 @@ use crate::printer::Printer;
|
||||||
use crate::settings::ResolverInstallerSettings;
|
use crate::settings::ResolverInstallerSettings;
|
||||||
|
|
||||||
/// Run a command.
|
/// Run a command.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn run(
|
pub(crate) async fn run(
|
||||||
command: ExternalCommand,
|
command: ExternalCommand,
|
||||||
python: Option<String>,
|
python: Option<String>,
|
||||||
|
|
|
@ -13,7 +13,6 @@ use crate::commands::ExitStatus;
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
||||||
/// Uninstall a tool.
|
/// Uninstall a tool.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) async fn uninstall(
|
pub(crate) async fn uninstall(
|
||||||
name: String,
|
name: String,
|
||||||
preview: PreviewMode,
|
preview: PreviewMode,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue