trading_agent.doctor.doctor_check
¶
The base class for one doctor check, and the result each check returns.
Typical usage example:
result = check.run() print(result.status, result.message)
CheckStatus
¶
Bases: StrEnum
How a check turned out.
CheckResult
dataclass
¶
The outcome of one check.
Attributes:
| Name | Type | Description |
|---|---|---|
status |
CheckStatus
|
Whether the check passed, passed with a warning, or failed. |
message |
str
|
A sentence explaining the outcome and, if needed, how to fix it. |
DoctorCheck
¶
One thing the doctor checks. Subclasses provide the name and the check.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
A short name shown in the doctor's report. |
run
¶
Runs the check.
Returns:
| Type | Description |
|---|---|
CheckResult
|
The outcome. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
Always, because subclasses must override this method. |