buffalo_core.diagnostics.DiagnosticReport

class buffalo_core.diagnostics.DiagnosticReport(entries=<factory>)[source]

Bases: object

Grouped diagnostics emitted by one workflow.

Notes

Reports preserve input order so workflows can keep diagnostics in the order they were discovered or produced. Convenience properties such as has_errors and for_severity() support quick inspection without changing the stored ordering.

Methods

for_severity(severity)

Return diagnostics matching one severity.

Attributes

entries

Ordered diagnostics emitted while performing one operation.

has_errors

Return whether the report contains any errors.

has_infos

Return whether the report contains any infos.

has_warnings

Return whether the report contains any warnings.

entries: tuple[Diagnostic, ...]

Ordered diagnostics emitted while performing one operation.

property has_errors: bool

Return whether the report contains any errors.

property has_warnings: bool

Return whether the report contains any warnings.

property has_infos: bool

Return whether the report contains any infos.

for_severity(severity)[source]

Return diagnostics matching one severity.

Parameters:

severity (DiagnosticSeverity) – Severity level to filter from entries.

Returns:

Ordered diagnostics whose severity matches severity exactly.

Return type:

tuple[Diagnostic, ]