mypy compliant

This commit is contained in:
brb
2023-07-13 12:11:49 +02:00
parent 2f69f49690
commit 7a965e5dfc
4 changed files with 24 additions and 38 deletions
+4 -7
View File
@@ -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