mypy compliant
This commit is contained in:
+4
-7
@@ -4,7 +4,6 @@ from git import Repo
|
||||
import logging
|
||||
import shutil
|
||||
import os
|
||||
import yaml
|
||||
from runner_script import RunnerScript
|
||||
|
||||
|
||||
@@ -24,10 +23,8 @@ def clone_repository(repo_url: AnyHttpUrl) -> Path:
|
||||
return dst_dir
|
||||
|
||||
|
||||
def load_runner_script(path: Path) -> RunnerScript:
|
||||
assert path.exists()
|
||||
with open(path, 'r') as fh:
|
||||
script = yaml.safe_load(fh)
|
||||
runner_script = RunnerScript.parse_obj(script)
|
||||
def execute_runner_script(path: Path) -> None:
|
||||
script_list = RunnerScript.from_file(path)
|
||||
for cmd in script_list:
|
||||
os.system(cmd)
|
||||
logging.debug('finished')
|
||||
return runner_script
|
||||
|
||||
Reference in New Issue
Block a user