From c334237b814f0fbb68a8ed4baf74f318949eaa71 Mon Sep 17 00:00:00 2001 From: meowmeow Date: Thu, 26 Sep 2024 13:33:31 +0000 Subject: [PATCH] Rename `installer` to `is_installer` --- src/pipx/backend.py | 4 ++-- src/pipx/venv.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pipx/backend.py b/src/pipx/backend.py index 66d7502c46..683fdb085c 100644 --- a/src/pipx/backend.py +++ b/src/pipx/backend.py @@ -10,13 +10,13 @@ logger = logging.getLogger(__name__) -def path_to_exec(executable: str, installer: bool = False) -> str: +def path_to_exec(executable: str, is_installer: bool = False) -> str: if executable in ("venv", "pip"): return executable path = shutil.which(executable) if path: return path - elif installer: + elif is_installer: logger.warning(f"'{executable}' not found on PATH. Falling back to 'pip'.") return "" else: diff --git a/src/pipx/venv.py b/src/pipx/venv.py index 49c4e64d86..24ff2ca936 100644 --- a/src/pipx/venv.py +++ b/src/pipx/venv.py @@ -112,7 +112,7 @@ def __init__( if not path_to_exec(self.backend): self.backend = "venv" - if not path_to_exec(self.installer, installer=True): + if not path_to_exec(self.installer, is_installer=True): self.installer = "pip" def check_upgrade_shared_libs(self, verbose: bool, pip_args: List[str], force_upgrade: bool = False): @@ -505,7 +505,7 @@ def _run_installer( return self._run_uv(["pip"] + install_cmd, quiet=quiet) def _run_uv(self, cmd: List[str], quiet: bool = True) -> "CompletedProcess[str]": - cmd = [path_to_exec("uv", installer=True)] + cmd + ["--python", str(self.python_path)] + cmd = [path_to_exec("uv", is_installer=True)] + cmd + ["--python", str(self.python_path)] if not self.verbose and quiet: cmd.append("-q") return run_subprocess(cmd, run_dir=str(self.root))