Base model for code analysis state validation.
| 39 | |
| 40 | |
| 41 | class CodeAnalysisState(BaseModel): |
| 42 | """Base model for code analysis state validation.""" |
| 43 | |
| 44 | generated_code: str = Field(..., description="The generated code to analyze") |
| 45 | errors: Dict[str, Any] = Field( |
| 46 | ..., description="Dictionary containing error information" |
| 47 | ) |
| 48 | |
| 49 | @validator("errors") |
| 50 | def validate_errors(cls, v): |
| 51 | """Ensure errors dictionary has expected structure.""" |
| 52 | if not isinstance(v, dict): |
| 53 | raise ValueError("errors must be a dictionary") |
| 54 | return v |
| 55 | |
| 56 | |
| 57 | class ExecutionAnalysisState(CodeAnalysisState): |
no outgoing calls
no test coverage detected