(base_path: str | None = None)
| 204 | |
| 205 | |
| 206 | def build_command_path(base_path: str | None = None) -> str: |
| 207 | candidates: list[str] = [] |
| 208 | if base_path is None: |
| 209 | base_path = os.environ.get("PATH", "") |
| 210 | candidates.extend(split_path_entries(base_path)) |
| 211 | |
| 212 | shell_path = interactive_shell_path() |
| 213 | if shell_path: |
| 214 | candidates.extend(split_path_entries(shell_path)) |
| 215 | |
| 216 | candidates.extend(str(path) for path in COMMON_PATH_HINTS) |
| 217 | return os.pathsep.join(dedupe_existing_paths(candidates)) |
| 218 | |
| 219 | |
| 220 | def build_python_path(base_path: str | None = None) -> str: |
no test coverage detected