from __future__ import annotations import abc import json import os import shutil import sys from pathlib import Path from textwrap import dedent from typing import TYPE_CHECKING, override from benchmark import Command from benchmark.projects import Project if TYPE_CHECKING: from benchmark.venv import Venv def which_tool(name: str, path: Path | None = None) -> Path: tool = shutil.which(name, path=path) assert tool is not None, ( f"Tool {name} not found. Run the script with `uv run