Skip to content

Commit ffbd204

Browse files
authored
Add fixQuality per CodeTF spec update (#999)
1 parent b2baa38 commit ffbd204

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
@@ -101,6 +101,17 @@ class Strategy(Enum):
101101
deterministic = "deterministic"
102102

103103

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

@@ -112,6 +123,7 @@ class ChangeSet(BaseModel):
112123
provisional: Optional[bool] = False
113124
# For fixed findings that are not associated with a specific change
114125
fixedFindings: Optional[list[Finding]] = None
126+
fixQuality: Optional[FixQuality] = None
115127

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

0 commit comments

Comments
 (0)