Skip to content

Commit 06ea192

Browse files
committed
Add fixQuality per CodeTF spec update
1 parent 84de1e4 commit 06ea192

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/codemodder/codetf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,17 @@ class Strategy(Enum):
9999
deterministic = "deterministic"
100100

101101

102+
class Rating(BaseModel):
103+
score: float
104+
description: Optional[str] = None
105+
106+
107+
class FixQuality(BaseModel):
108+
safetyRating: Rating
109+
effectivenessRating: Rating
110+
cleanlinessRating: Rating
111+
112+
102113
class ChangeSet(BaseModel):
103114
"""A set of changes made to a file at `path`"""
104115

@@ -110,6 +121,7 @@ class ChangeSet(BaseModel):
110121
provisional: Optional[bool] = False
111122
# For fixed findings that are not associated with a specific change
112123
fixedFindings: Optional[list[Finding]] = None
124+
fixQuality: Optional[FixQuality] = None
113125

114126
def with_changes(self, changes: list[Change]) -> ChangeSet:
115127
return ChangeSet(

0 commit comments

Comments
 (0)