Skip to content

Commit e4a2fa1

Browse files
committed
refactor: rename version_part to specified_version
1 parent 286c99b commit e4a2fa1

File tree

1 file changed

+4
-4
lines changed
  • crates/uv/src/commands/project

1 file changed

+4
-4
lines changed

crates/uv/src/commands/project/run.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
10921092
// Ensure `VIRTUAL_ENV` is set.
10931093
if interpreter.is_virtualenv() {
10941094
process.env(EnvVars::VIRTUAL_ENV, interpreter.sys_prefix().as_os_str());
1095-
};
1095+
}
10961096

10971097
// Spawn and wait for completion
10981098
// Standard input, output, and error streams are all inherited
@@ -1107,18 +1107,18 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
11071107
if err.kind() == std::io::ErrorKind::NotFound && is_python_executable(&executable) {
11081108
// Get version from python command string
11091109
// e.g. python3.12 -> "3.12" or "" if python version not specified.
1110-
let version_part = executable.strip_prefix("python").unwrap_or("");
1110+
let specified_version = executable.strip_prefix("python").unwrap_or("");
11111111
let current_executable_python_version = base_interpreter.python_version().only_release();
11121112
// Determine the environment type
11131113
let env_type = if project_found { "project" } else { "virtual" };
11141114

11151115
let message_suffix = if project_found {
11161116
format!(
1117-
"Did you mean to change the environment to Python {version_part} with `uv run -p {version_part} python`?"
1117+
"Did you mean to change the environment to Python {specified_version} with `uv run -p {specified_version} python`?"
11181118
)
11191119
} else {
11201120
format!(
1121-
"Did you mean to search for a Python {version_part} environment with `uv run -p {version_part} python`?"
1121+
"Did you mean to search for a Python {specified_version} environment with `uv run -p {specified_version} python`?"
11221122
)
11231123
};
11241124
anyhow!(

0 commit comments

Comments
 (0)