Return hook installer CLIs found on PATH. ``pre-commit`` and ``prek`` are interchangeable. ``pre-commit`` is listed first when both are present so existing setups keep a stable default unless the user is asked to choose.
()
| 8 | |
| 9 | |
| 10 | def available_hook_installers() -> list[str]: |
| 11 | """Return hook installer CLIs found on PATH. |
| 12 | |
| 13 | ``pre-commit`` and ``prek`` are interchangeable. ``pre-commit`` is |
| 14 | listed first when both are present so existing setups keep a stable |
| 15 | default unless the user is asked to choose. |
| 16 | """ |
| 17 | return [tool for tool in _HOOK_INSTALLERS if shutil.which(tool)] |
| 18 | |
| 19 | |
| 20 | def is_pre_commit_installed() -> bool: |
no outgoing calls
no test coverage detected