dev #10
|  | @ -164,15 +164,17 @@ class DiffOutputConfig(BaseModel): | |||
|     score: Optional[int] = None | ||||
|     file_name: str = Field("", alias="fileName") | ||||
|     answer_path: str = Field("", alias="answerPath") | ||||
|     force_quit_on_diff: Optional[bool] = Field(False, alias="forceQuitOnDiff") | ||||
|     always_hide: Optional[bool] = Field(False, alias="alwaysHide") | ||||
|     compare_space: Optional[bool] = Field(False, alias="compareSpace") | ||||
|     force_quit_on_diff: Optional[bool] = Field( | ||||
|         False, serialization_alias="forceQuitOnDiff" | ||||
|     ) | ||||
|     always_hide: Optional[bool] = Field(False, serialization_alias="alwaysHide") | ||||
|     compare_space: Optional[bool] = Field(False, serialization_alias="compareSpace") | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
| 
 | ||||
| 
 | ||||
| class ResultDetailConfig(BaseModel): | ||||
|     score: int = 0 | ||||
|     comment: str = "" | ||||
|     show_files: List[str] = Field([], alias="showFiles") | ||||
|     show_exit_status: Optional[bool] = Field(True, alias="showExitStatus") | ||||
|     show_runtime: Optional[bool] = Field(True, alias="showRuntime") | ||||
|     show_memory: Optional[bool] = Field(False, alias="showMemory") | ||||
|     show_files: List[str] = Field([], serialization_alias="showFiles") | ||||
|     show_exit_status: Optional[bool] = Field(True, serialization_alias="showExitStatus") | ||||
| 
					
					jon-lee marked this conversation as resolved
					
				 
				
					
						张泊明518370910136
						commented  also these  also these `Optional`? 
				
					
						李衍志523370910113
						commented  I guess some of the field have default within JOJ3, so I choose optional just to reduce the length of json previously I guess some of the field have default within JOJ3, so I choose optional just to reduce the length of json previously 
				
					
						张泊明518370910136
						commented  better put all defaults here then we only need to check the code here better put all defaults here then we only need to check the code here 
				
					
						李衍志523370910113
						commented  indeed. indeed. | ||||
|     show_runtime: Optional[bool] = Field(True, serialization_alias="showRuntime") | ||||
|     show_memory: Optional[bool] = Field(False, serialization_alias="showMemory") | ||||
|  |  | |||
|  | @ -130,15 +130,25 @@ def fix_result_detail( | |||
|             if task_stage.result_detail.stderr: | ||||
|                 show_files.append("stderr") | ||||
|             result_detail_parser.with_.update( | ||||
|                 { | ||||
|                     "score": 0, | ||||
|                     "comment": "", | ||||
|                     "showFiles": show_files, | ||||
|                     "showExitStatus": task_stage.result_detail.exitstatus, | ||||
|                     "showRuntime": task_stage.result_detail.time, | ||||
|                     "showMemory": task_stage.result_detail.mem, | ||||
|                 } | ||||
|                 result.ResultDetailConfig( | ||||
|                     score=0, | ||||
|                     comment="", | ||||
|                     show_files=show_files, | ||||
|                     show_exit_status=task_stage.result_detail.exitstatus, | ||||
|                     show_runtime=task_stage.result_detail.time, | ||||
|                     show_memory=task_stage.result_detail.mem, | ||||
|                 ).model_dump() | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  When will it be None? When will it be None? | ||||
|             ) | ||||
|             # result_detail_parser.with_.update( | ||||
|             #     { | ||||
|             #         "score": 0, | ||||
|             #         "comment": "", | ||||
|             #         "showFiles": show_files, | ||||
|             #         "showExitStatus": task_stage.result_detail.exitstatus, | ||||
|             #         "showRuntime": task_stage.result_detail.time, | ||||
|             #         "showMemory": task_stage.result_detail.mem, | ||||
|             #     } | ||||
|             # ) | ||||
| 
 | ||||
|     return conf_stage | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
Are these
Optionalnecessary?