Skip to content

Commit 3798bac

Browse files
committed
readd fixes for validation results
1 parent 9faac7b commit 3798bac

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

resources/py/scripts/prebuild.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function fixPassResult() {
128128
'_obj = cls.model_validate({',
129129
// The python formatter suddenly decided it didn't like tab characters
130130
// even though they're fine later on in the string...
131-
'\n if obj.get("outcome") != "pass":\n raise ValueError("PassResult must have an outcome value of \\"pass\\"!")\n _obj = cls.model_validate({\n\t\t\t"metadata": obj.get("metadata"),\n\t\t\t"value_override": obj.get("valueOverride"),'
131+
'\n if obj.get("outcome") != "pass":\n raise ValueError("PassResult must have an outcome value of \\"pass\\"!")\n _obj = cls.model_validate({\n\t\t\t"value_override": obj.get("valueOverride"),'
132132
)
133133

134134
if (passResultFile === passResult) {
@@ -146,7 +146,7 @@ function fixFailResult() {
146146
'_obj = cls.model_validate({',
147147
// The python formatter suddenly decided it didn't like tab characters
148148
// even though they're fine later on in the string...
149-
'\n if obj.get("outcome") != "fail":\n raise ValueError("FailResult must have an outcome value of \\"fail\\"!")\n _obj = cls.model_validate({\n\t\t\t"error_message": obj.get("errorMessage"),\n\t\t\t"fix_value": obj.get("fixValue"),\n\t\t\t"error_spans": [ErrorSpan.from_dict(es) for es in obj.get("errorSpans", [])],\n\t\t\t"metadata": obj.get("metadata"),'
149+
'\n if obj.get("outcome") != "fail":\n raise ValueError("FailResult must have an outcome value of \\"fail\\"!")\n _obj = cls.model_validate({\n\t\t\t"error_message": obj.get("errorMessage"),\n\t\t\t"fix_value": obj.get("fixValue"),\n\t\t\t"error_spans": [ErrorSpan.from_dict(es) for es in obj.get("errorSpans", [])],'
150150
)
151151

152152
if (failResultFile === failResult) {
@@ -158,8 +158,8 @@ function fixFailResult() {
158158

159159
function fixValidationResults() {
160160
// fixValidationResult();
161-
// fixPassResult();
162-
// fixFailResult();
161+
fixPassResult();
162+
fixFailResult();
163163
}
164164

165165
function fixValidatorLogValidationResult () {
@@ -428,7 +428,6 @@ function main () {
428428
globalReplacements();
429429
hotFixes();
430430
buildReadme();
431-
// updateUrlLib3();
432431
updateDependencies();
433432
buildSetupPy();
434433
}

0 commit comments

Comments
 (0)