(
self,
runtime: Optional[Any] = None,
get_answer_symbol: Optional[str] = None,
get_answer_expr: Optional[str] = None,
get_answer_from_stdout: bool = False,
timeout_length: int = 5,
)
| 74 | |
| 75 | class PythonExecutor: |
| 76 | def __init__( |
| 77 | self, |
| 78 | runtime: Optional[Any] = None, |
| 79 | get_answer_symbol: Optional[str] = None, |
| 80 | get_answer_expr: Optional[str] = None, |
| 81 | get_answer_from_stdout: bool = False, |
| 82 | timeout_length: int = 5, |
| 83 | ) -> None: |
| 84 | self.runtime = runtime if runtime else GenericRuntime() |
| 85 | self.answer_symbol = get_answer_symbol |
| 86 | self.answer_expr = get_answer_expr |
| 87 | self.get_answer_from_stdout = get_answer_from_stdout |
| 88 | self.pool = Pool(multiprocess.cpu_count()) |
| 89 | self.timeout_length = timeout_length |
| 90 | |
| 91 | def process_generation_to_code(self, gens: str): |
| 92 | return [g.strip().split('\n') for g in gens] |
nothing calls this directly
no test coverage detected