style: use const
This commit is contained in:
		
							parent
							
								
									a8a7fd47a0
								
							
						
					
					
						commit
						391d61d006
					
				|  | @ -5,6 +5,7 @@ from joj3_config_generator.models.common import Memory, Time | ||||||
| DEFAULT_CPU_LIMIT = Time("1s") | DEFAULT_CPU_LIMIT = Time("1s") | ||||||
| DEFAULT_MEMORY_LIMIT = Memory("256m") | DEFAULT_MEMORY_LIMIT = Memory("256m") | ||||||
| DEFAULT_FILE_LIMIT = Memory("32m") | DEFAULT_FILE_LIMIT = Memory("32m") | ||||||
|  | DEFAULT_CASE_SCORE = 5 | ||||||
| 
 | 
 | ||||||
| JOJ3_CONFIG_ROOT = Path("/home/tt/.config/joj") | JOJ3_CONFIG_ROOT = Path("/home/tt/.config/joj") | ||||||
| TEAPOT_CONFIG_ROOT = Path("/home/tt/.config/teapot") | TEAPOT_CONFIG_ROOT = Path("/home/tt/.config/teapot") | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ from functools import partial | ||||||
| from pathlib import Path | from pathlib import Path | ||||||
| from typing import Any, Callable, Dict, List, Set, Tuple | from typing import Any, Callable, Dict, List, Set, Tuple | ||||||
| 
 | 
 | ||||||
| from joj3_config_generator.models import result, task | from joj3_config_generator.models import const, result, task | ||||||
| from joj3_config_generator.models.common import Memory, Time | from joj3_config_generator.models.common import Memory, Time | ||||||
| from joj3_config_generator.models.const import JOJ3_CONFIG_ROOT | from joj3_config_generator.models.const import JOJ3_CONFIG_ROOT | ||||||
| from joj3_config_generator.models.task import Parser as ParserEnum | from joj3_config_generator.models.task import Parser as ParserEnum | ||||||
|  | @ -179,7 +179,6 @@ def fix_diff( | ||||||
|             if any(case.endswith(other) for other in task_stage.cases) |             if any(case.endswith(other) for other in task_stage.cases) | ||||||
|         ] |         ] | ||||||
|     ) |     ) | ||||||
|     print(default_cases) |  | ||||||
|     stage_cases = [] |     stage_cases = [] | ||||||
|     parser_cases = [] |     parser_cases = [] | ||||||
|     for case, case_stage in valid_cases: |     for case, case_stage in valid_cases: | ||||||
|  | @ -225,7 +224,7 @@ def fix_diff( | ||||||
|         parser_case = result.DiffCasesConfig( |         parser_case = result.DiffCasesConfig( | ||||||
|             outputs=[ |             outputs=[ | ||||||
|                 result.DiffOutputConfig( |                 result.DiffOutputConfig( | ||||||
|                     score=5,  # default score |                     score=const.DEFAULT_CASE_SCORE, | ||||||
|                     file_name="stdout", |                     file_name="stdout", | ||||||
|                     answer_path=str(base_dir / f"{case}.out"), |                     answer_path=str(base_dir / f"{case}.out"), | ||||||
|                 ) |                 ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user