Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Aug 11, 2024
1 parent 6c8c7a8 commit f08322b
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 183 deletions.
20 changes: 15 additions & 5 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2450,6 +2450,16 @@ pub struct AddArgs {
#[arg(long, conflicts_with = "isolated")]
pub package: Option<PackageName>,

/// Add the dependency to the specified Python script, rather than to a project.
///
/// If provided, uv will add the dependency to the script's inline metadata
/// table, in adhere with PEP 723. If no such inline metadata table is present,
/// a new one will be created and added to the script. When executed via `uv run`,
/// uv will create a temporary environment for the script with all inline
/// dependencies installed.
#[arg(long)]
pub script: Option<PathBuf>,

/// The Python interpreter to use for resolving and syncing.
///
/// See `uv help python` for details on Python discovery and supported
Expand All @@ -2462,10 +2472,6 @@ pub struct AddArgs {
help_heading = "Python options"
)]
pub python: Option<String>,

/// Specifies the Python script where the dependency will be added.
#[arg(long)]
pub script: Option<PathBuf>,
}

#[derive(Args)]
Expand Down Expand Up @@ -2513,9 +2519,13 @@ pub struct RemoveArgs {
#[arg(long, conflicts_with = "isolated")]
pub package: Option<PackageName>,

/// Specifies the Python script where the dependency will be removed.
/// Remove the dependency from the specified Python script, rather than from a project.
///
/// If provided, uv will remove the dependency from the script's inline metadata
/// table, in adhere with PEP 723.
#[arg(long)]
pub script: Option<PathBuf>,

/// The Python interpreter to use for resolving and syncing.
///
/// See `uv help python` for details on Python discovery and supported
Expand Down
Loading

0 comments on commit f08322b

Please sign in to comment.