INNER CODE UNIT · Python
collect_doctor_checks
ghost-in-the-droid/android-agent · gitd/cli.py:572
def collect_doctor_checks() -> list[dict]:
"""Preflight environment checks. Returns a list of
{name, status: ok|warn|fail, detail, hint} dicts — no printing, so it's
unit-testable. `cmd_doctor` renders and sets the exit code from these.
"""
checks: list[dict] = []
# Python version
py = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
py_ok = sys.version_info >= (3, 10)
checks.append(
{
"name": "Python >= 3.10",
"status": "ok" if py_ok else "fail",
"detail": py,
"hint": "" if py_ok else "Ghost requires Python 3.10+.",
}
)