Coverage for /home/runner/work/bijux-cli/bijux-cli/src/bijux_cli/contracts/doctor.py: 100%
6 statements
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-19 23:36 +0000
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-19 23:36 +0000
1# SPDX-License-Identifier: MIT
2# Copyright © 2025 Bijan Mousavi
4"""Defines the contract for the CLI health check and diagnostics service.
6This module specifies the `DoctorProtocol`, a formal interface that any
7service responsible for running diagnostic health checks on the CLI and its
8environment must implement.
9"""
11from __future__ import annotations
13from typing import Protocol, TypeVar, runtime_checkable
15T = TypeVar("T")
18@runtime_checkable
19class DoctorProtocol(Protocol):
20 """Defines the contract for CLI health checks.
22 This interface specifies the methods for performing system health checks
23 and gathering diagnostic information about the CLI and its environment.
24 """
26 def check_health(self) -> str:
27 """Performs health checks and returns a status string.
29 Returns:
30 str: A string describing the overall health status of the CLI.
31 """
32 ...