Skip to content

Commit c334237

Browse files
committed
Rename installer to is_installer
1 parent bca02e2 commit c334237

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pipx/backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
logger = logging.getLogger(__name__)
1111

1212

13-
def path_to_exec(executable: str, installer: bool = False) -> str:
13+
def path_to_exec(executable: str, is_installer: bool = False) -> str:
1414
if executable in ("venv", "pip"):
1515
return executable
1616
path = shutil.which(executable)
1717
if path:
1818
return path
19-
elif installer:
19+
elif is_installer:
2020
logger.warning(f"'{executable}' not found on PATH. Falling back to 'pip'.")
2121
return ""
2222
else:

src/pipx/venv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __init__(
112112

113113
if not path_to_exec(self.backend):
114114
self.backend = "venv"
115-
if not path_to_exec(self.installer, installer=True):
115+
if not path_to_exec(self.installer, is_installer=True):
116116
self.installer = "pip"
117117

118118
def check_upgrade_shared_libs(self, verbose: bool, pip_args: List[str], force_upgrade: bool = False):
@@ -505,7 +505,7 @@ def _run_installer(
505505
return self._run_uv(["pip"] + install_cmd, quiet=quiet)
506506

507507
def _run_uv(self, cmd: List[str], quiet: bool = True) -> "CompletedProcess[str]":
508-
cmd = [path_to_exec("uv", installer=True)] + cmd + ["--python", str(self.python_path)]
508+
cmd = [path_to_exec("uv", is_installer=True)] + cmd + ["--python", str(self.python_path)]
509509
if not self.verbose and quiet:
510510
cmd.append("-q")
511511
return run_subprocess(cmd, run_dir=str(self.root))

0 commit comments

Comments
 (0)