File size: 448 Bytes
e1d6e8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from pydantic import BaseModel
from typing import List, Optional, Tuple

class Finding(BaseModel):
    id: str
    title: str
    severity: str  # blocker, high, medium, low, nit
    file: str
    line_range: Optional[Tuple[int, int]] = None
    description: str
    suggested_fix: Optional[str] = None
    confidence: int = 0
    evidence: Optional[List[dict]] = None

class ReviewResponse(BaseModel):
    summary: str
    findings: List[Finding]