diff --git a/package.nls.json b/package.nls.json index 3a4ddcec..7e9f84dc 100644 --- a/package.nls.json +++ b/package.nls.json @@ -45,5 +45,5 @@ "python-envs.revealProjectInExplorer.title": "Reveal Project in Explorer", "python-envs.revealEnvInManagerView.title": "Reveal in Environment Managers View", "python-envs.runPetInTerminal.title": "Run Python Environment Tool (PET) in Terminal...", - "python-envs.alwaysUseUv.description": "When set to true, uv will be used to manage all virtual environments if available. When set to false, uv will only manage virtual environments explicitly created by uv." + "python-envs.alwaysUseUv.description": "When set to true, uv will be used to manage all virtual environments if available, and the run button will execute files with uv run. When set to false, uv will only manage environments explicitly created by uv, including for the run button." } diff --git a/src/features/execution/pep723.ts b/src/features/execution/pep723.ts new file mode 100644 index 00000000..a8d7becc --- /dev/null +++ b/src/features/execution/pep723.ts @@ -0,0 +1,24 @@ +import * as fse from 'fs-extra'; + +/** + * Checks if a Python script file uses PEP 723 inline script metadata. + * + * PEP 723 scripts declare their own Python version and dependency requirements + * via a `# /// script` block and should be run with `uv run