CodeLATS / executors /factory.py
Ron
initial commit
41d1bc5
raw
history blame contribute delete
265 Bytes
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}")