File size: 265 Bytes
41d1bc5
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from .py_executor import PyExecutor
from .executor_types import Executor

def executor_factory(lang: str) -> Executor:
    if lang == "py" or lang == "python":
        return PyExecutor()
    else:
        raise ValueError(f"Invalid language for executor: {lang}")