Support uv run -m foo to run a module (#7754)

## Summary

This is another attempt using `module: bool` instead of `module:
Option<String>` following #7322.
The original PR can't be reopened after a force-push to the branch, I've
created this new PR.

Resolves #6638
This commit is contained in:
Jo
2024-09-28 23:07:21 +08:00
committed by GitHub
parent 1cae78dd03
commit 0dbf9ae4a7
6 changed files with 81 additions and 10 deletions
+7 -1
View File
@@ -2469,6 +2469,12 @@ pub struct RunArgs {
#[arg(long, overrides_with("dev"))]
pub no_dev: bool,
/// Run a Python module.
///
/// Equivalent to `python -m <module>`.
#[arg(short, long)]
pub module: bool,
/// Omit non-development dependencies.
///
/// The project itself will also be omitted.
@@ -2495,7 +2501,7 @@ pub struct RunArgs {
#[arg(long)]
pub with: Vec<String>,
/// Run with the given packages installed as editables
/// Run with the given packages installed as editables.
///
/// When used in a project, these dependencies will be layered on top of
/// the project environment in a separate, ephemeral environment. These