gui.model.CheckResult(findings, seconds, finished)
The outcome of spotregen check on a loaded spec.
Attributes
| findings |
tuple[Finding, …] |
The findings, errors first. |
| seconds |
float |
How long the checks took. |
| finished |
datetime |
When they finished. |
Examples
from pathlib import Path
from tempfile import TemporaryDirectory
from spotregen import make_sample_repo
from spotregen.gui.model import load_repository, run_check
with TemporaryDirectory() as tmp:
result = run_check(load_repository(make_sample_repo(Path(tmp) / "demo")).spec)
print(len(result.findings), result.exit_code())
Methods
| exit_code |
The exit code spotregen check would return. |
| summary |
The summary line spotregen check prints. |
exit_code
gui.model.CheckResult.exit_code(strict=False)
The exit code spotregen check would return.
Parameters
| strict |
bool |
Whether warnings fail the check as well. |
False |
summary
gui.model.CheckResult.summary(spec)
The summary line spotregen check prints.
Parameters
| spec |
RegenSpec |
The spec that was checked. |
required |
Returns
| str |
str |
regen check: N units, E errors, W warnings. |