(pip_location: Optional[str])
| 23 | # We explicitly depend on system pip, so the SystemError should not |
| 24 | # be executed (except for broken installations). |
| 25 | def _check_pip_version(pip_location: Optional[str]) -> bool: |
| 26 | if not pip_location: |
| 27 | return False |
| 28 | |
| 29 | with suppress(subprocess.CalledProcessError): |
| 30 | stdout = subprocess.check_output([pip_location, "--version"], text=True) |
| 31 | return "python 3" in stdout |
| 32 | |
| 33 | targets = [ |
| 34 | "pip", |
no outgoing calls
no test coverage detected