Repository: astral-sh/uv
File: crates/uv/src/lib.rs (Rust)

Code before:
            .await
        }
        Commands::Pip(PipNamespace {
            command: PipCommand::Check(args),
        }) => {
            // Resolve the settings from the command-line arguments and workspace configuration.
            let args = PipCheckSettings::resolve(args, filesystem, environment);
            show_settings!(args);

            // Initialize the cache.
            let cache = cache.init()?;

            commands::pip_check(
                args.settings.python.as_deref(),
                args.settings.system,
                args.settings.python_version.as_ref(),
                args.settings.python_platform.as_ref(),
                &cache,
                printer,
                globals.preview,
            )
        }
        Commands::Pip(PipNamespace {
            command: PipCommand::Debug(_),
        }) => {
            warn_user_once!("The `debug` subcommand is not present in `uv pip`");
            Ok(ExitStatus::Error)
        }
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Clean(args),
        })
        | Commands::Clean(args) => {
            show_settings!(args);
            commands::cache_clean(&args.package, args.force, cache, printer)
        }
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Prune(args),
        }) => {
            show_settings!(args);
            commands::cache_prune(args.ci, args.force, cache, printer)
        }
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Dir,
        }) => commands::cache_dir(&cache, printer),
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Size(args),
        }) => commands::cache_size(&cache, args.human, printer, globals.preview),
        Commands::Build(args) => {
            // Resolve the settings from the command-line arguments and workspace configuration.
            let args = settings::BuildSettings::resolve(args, filesystem, environment);
            show_settings!(args);

Review comment (bug):
I know normally things would call e.g. `commands::pip_debug()` but it seemed like a lot of unnecessary boilerplate to achieve this result.

Code after:
            .await
        }
        Commands::Pip(PipNamespace {
            command: PipCommand::Check(args),
        }) => {
            // Resolve the settings from the command-line arguments and workspace configuration.
            let args = PipCheckSettings::resolve(args, filesystem, environment);
            show_settings!(args);

            // Initialize the cache.
            let cache = cache.init()?;

            commands::pip_check(
                args.settings.python.as_deref(),
                args.settings.system,
                args.settings.python_version.as_ref(),
                args.settings.python_platform.as_ref(),
                &cache,
                printer,
                globals.preview,
            )
        }
        Commands::Pip(PipNamespace {
            command: PipCommand::Debug(_),
        }) => Err(anyhow!(
            "pip's `debug` is unsupported (consider using `uvx pip debug` instead)"
        )),
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Clean(args),
        })
        | Commands::Clean(args) => {
            show_settings!(args);
            commands::cache_clean(&args.package, args.force, cache, printer)
        }
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Prune(args),
        }) => {
            show_settings!(args);
            commands::cache_prune(args.ci, args.force, cache, printer)
        }
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Dir,
        }) => commands::cache_dir(&cache, printer),
        Commands::Cache(CacheNamespace {
            command: CacheCommand::Size(args),
        }) => commands::cache_size(&cache, args.human, printer, globals.preview),
        Commands::Build(args) => {
            // Resolve the settings from the command-line arguments and workspace configuration.
            let args = settings::BuildSettings::resolve(args, filesystem, environment);
            show_settings!(args);