dev #10
|  | @ -151,20 +151,20 @@ def fix_dummy( | |||
|     ] | ||||
|     if task_stage.parsers is not None: | ||||
|         for parser in task_stage.parsers: | ||||
|             if parser in dummy_parser: | ||||
|                 dummy_parser_ = next(p for p in conf_stage.parsers if p.name == parser) | ||||
|                 if ( | ||||
|                     getattr(task_stage, parser.replace("-", "_"), None) is not None | ||||
|                 ) and (task_stage.result_status is not None): | ||||
|                     dummy_parser_.with_.update( | ||||
|                         { | ||||
|                             "score": task_stage.result_status.score, | ||||
|                             "comment": task_stage.result_status.comment, | ||||
|                             "forceQuitOnNotAccepted": task_stage.result_status.forcequit, | ||||
|                         } | ||||
|                     ) | ||||
|             else: | ||||
|             if parser not in dummy_parser: | ||||
|                 continue | ||||
| 
					
					bomingzh marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
|             dummy_parser_ = next(p for p in conf_stage.parsers if p.name == parser) | ||||
|             if getattr(task_stage, parser.replace("-", "_"), None) is None: | ||||
|                 continue | ||||
|             if task_stage.result_status is None: | ||||
|                 continue | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  move  move `continue` to the other branch to reduce nesting 
				
					
						张泊明518370910136
						commented  I mean I mean
```
if parser not in keyword_parser:
    continue
```
```
if getattr(task_stage, parser, None) is None:
    continue
````
```
if score != score_:
    continue
```` 
				
					
						李衍志523370910113
						commented  fixed. fixed. | ||||
|             dummy_parser_.with_.update( | ||||
|                 { | ||||
|                     "score": task_stage.result_status.score, | ||||
|                     "comment": task_stage.result_status.comment, | ||||
|                     "forceQuitOnNotAccepted": task_stage.result_status.forcequit, | ||||
|                 } | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  Is it necessary to rename? Is it necessary to rename? | ||||
|             ) | ||||
|     return conf_stage | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
these fields do not exist now
resolved