Add support for optional --description in uv init (#10209)
## Summary Closes #7913 by adding an optional `--description` argument to `uv init` that fills the description field in the pyproject.toml with the supplied arg value. Updated `uv init` docs to describe this new optional argument. <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan Added snapshot tests in `uv/crates/uv/tests/it/init.rs` to test this functionality. <!-- How was it tested? --> --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
@@ -2568,9 +2568,13 @@ pub struct InitArgs {
|
||||
///
|
||||
/// By default, adds a requirement on the system Python version; use `--python` to specify an
|
||||
/// alternative Python version requirement.
|
||||
#[arg(long, conflicts_with_all=["app", "lib", "package", "build_backend"])]
|
||||
#[arg(long, conflicts_with_all=["app", "lib", "package", "build_backend", "description"])]
|
||||
pub r#script: bool,
|
||||
|
||||
/// Set the project description.
|
||||
#[arg(long, conflicts_with = "script")]
|
||||
pub description: Option<String>,
|
||||
|
||||
/// Initialize a version control system for the project.
|
||||
///
|
||||
/// By default, uv will initialize a Git repository (`git`). Use `--vcs none` to explicitly
|
||||
|
||||
Reference in New Issue
Block a user