buffalo_core.Diagnostic
- class buffalo_core.Diagnostic(severity, code, message, location=None)[source]
Bases:
objectStructured diagnostic suitable for programmatic reporting.
- Raises:
ValueError – If
codeormessageis an empty string.
Notes
The
codefield is intended to remain stable enough for programmatic filtering and test assertions. Themessagefield is intended for direct human consumption.Attributes
Severity classification for the diagnostic.
Stable machine-readable diagnostic code.
Human-readable message describing the issue or informational result.
Optional location metadata that localizes where the diagnostic applies.
- severity: DiagnosticSeverity
Severity classification for the diagnostic.
- code: str
Stable machine-readable diagnostic code.
- message: str
Human-readable message describing the issue or informational result.
- location: DiagnosticLocation | None
Optional location metadata that localizes where the diagnostic applies.