flake8 compliant
This commit is contained in:
+1
-2
@@ -44,7 +44,7 @@ def handle_event(request: GiteaRequest):
|
||||
# extract information
|
||||
commit_msg = request.head_commit['message']
|
||||
repo_url = request.repository['clone_url']
|
||||
branch_name = request.ref.split('/')[-1]
|
||||
# branch_name = request.ref.split('/')[-1]
|
||||
# stop early if asked
|
||||
if commit_msg.lower().startswith('[skip ci]'):
|
||||
raise HTTPException(
|
||||
@@ -63,7 +63,6 @@ def handle_event(request: GiteaRequest):
|
||||
# execute runner script
|
||||
logging.info('rexecuting runner script')
|
||||
execute_runner_script(path=runner_script_path)
|
||||
|
||||
# # TODO: create virtualenv?
|
||||
# # install requirements
|
||||
# assert pipeline.requirements is not None
|
||||
|
||||
@@ -15,7 +15,12 @@ class RunnerScript(BaseModel):
|
||||
content_dict = yaml.safe_load(fh)
|
||||
script_list = content_dict['script'].split('\n')
|
||||
logging.debug('finished')
|
||||
return RunnerScript.model_validate({'script': script_list}) # type: ignore
|
||||
rs = RunnerScript.model_validate( # type: ignore
|
||||
{
|
||||
'script': script_list
|
||||
}
|
||||
)
|
||||
return rs
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -2,7 +2,6 @@ from dotenv import load_dotenv
|
||||
import logging
|
||||
from configparser import ConfigParser
|
||||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
|
||||
# load default values
|
||||
|
||||
Reference in New Issue
Block a user