Omit empty uv.tool.dev-dependencies on `uv init` (#5406)

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

Implements #5340

## Test Plan

<!-- How was it tested? -->
This commit is contained in:
Trevor Manz 2024-07-24 10:53:49 -04:00 committed by GitHub
parent cf971a86d7
commit d642705104
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 39 deletions

View File

@ -173,9 +173,6 @@ pub(crate) async fn init(
description = "Add your description here"{readme}
requires-python = "{requires_python}"
dependencies = []
[tool.uv]
dev-dependencies = []
"#,
readme = if no_readme { "" } else { "\nreadme = \"README.md\"" },
requires_python = requires_python.specifiers(),

View File

@ -39,9 +39,6 @@ fn init() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -100,9 +97,6 @@ fn init_no_readme() -> Result<()> {
description = "Add your description here"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -143,9 +137,6 @@ fn init_current_dir() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -209,9 +200,6 @@ fn init_dot_args() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -288,9 +276,6 @@ fn init_workspace() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -383,9 +368,6 @@ fn init_workspace_relative_sub_package() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -479,9 +461,6 @@ fn init_workspace_outside() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -560,9 +539,6 @@ fn init_invalid_names() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -695,9 +671,6 @@ fn init_nested_workspace() -> Result<()> {
readme = "README.md"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -927,9 +900,6 @@ fn init_requires_python_workspace() -> Result<()> {
readme = "README.md"
requires-python = ">=3.10"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -980,9 +950,6 @@ fn init_requires_python_version() -> Result<()> {
readme = "README.md"
requires-python = ">=3.8"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});
@ -1034,9 +1001,6 @@ fn init_requires_python_specifiers() -> Result<()> {
readme = "README.md"
requires-python = "==3.8.*"
dependencies = []
[tool.uv]
dev-dependencies = []
"###
);
});