Result from analyzing a report section. Attributes: section_id: The section that was analyzed. section_name: Human-readable section name. data: Raw data gathered from SQL queries. summary: LLM-generated summary of the section. severity: Overall severity o
| 46 | |
| 47 | @dataclass |
| 48 | class SectionResult: |
| 49 | """Result from analyzing a report section. |
| 50 | |
| 51 | Attributes: |
| 52 | section_id: The section that was analyzed. |
| 53 | section_name: Human-readable section name. |
| 54 | data: Raw data gathered from SQL queries. |
| 55 | summary: LLM-generated summary of the section. |
| 56 | severity: Overall severity of findings in this section. |
| 57 | error: Error message if analysis failed. |
| 58 | """ |
| 59 | section_id: str |
| 60 | section_name: str |
| 61 | data: dict[str, Any] = field(default_factory=dict) |
| 62 | summary: str = '' |
| 63 | severity: Severity = Severity.INFO |
| 64 | error: Optional[str] = None |
| 65 | |
| 66 | @property |
| 67 | def has_error(self) -> bool: |
| 68 | """Check if this section had an error.""" |
| 69 | return self.error is not None |
| 70 | |
| 71 | def to_dict(self) -> dict: |
| 72 | """Convert to dictionary representation.""" |
| 73 | return { |
| 74 | 'section_id': self.section_id, |
| 75 | 'section_name': self.section_name, |
| 76 | 'summary': self.summary, |
| 77 | 'severity': self.severity.value, |
| 78 | 'error': self.error |
| 79 | } |
no outgoing calls
no test coverage detected