Some pep8 fixes
This commit is contained in:
@ -76,7 +76,7 @@ def get_args():
|
|||||||
help='Git hoster to be queried for failed Pull Requests.\n'
|
help='Git hoster to be queried for failed Pull Requests.\n'
|
||||||
'Default: [github, gitea].'
|
'Default: [github, gitea].'
|
||||||
)
|
)
|
||||||
return(parser.parse_args())
|
return parser.parse_args()
|
||||||
|
|
||||||
def get_gitea_repos(url, headers, gitea_org):
|
def get_gitea_repos(url, headers, gitea_org):
|
||||||
repositories = []
|
repositories = []
|
||||||
@ -99,7 +99,7 @@ def get_gitea_repos(url, headers, gitea_org):
|
|||||||
print("The request status is: " + str(res.status_code) +
|
print("The request status is: " + str(res.status_code) +
|
||||||
" | " + str(res.reason))
|
" | " + str(res.reason))
|
||||||
break
|
break
|
||||||
return(repositories)
|
return repositories
|
||||||
|
|
||||||
def get_gitea_prs(url, headers, gitea_org, repo):
|
def get_gitea_prs(url, headers, gitea_org, repo):
|
||||||
pullrequests = []
|
pullrequests = []
|
||||||
@ -116,7 +116,7 @@ def get_gitea_prs(url, headers, gitea_org, repo):
|
|||||||
print("The request status is: " + str(res.status_code) +
|
print("The request status is: " + str(res.status_code) +
|
||||||
" | " + str(res.reason))
|
" | " + str(res.reason))
|
||||||
exit()
|
exit()
|
||||||
return(pullrequests)
|
return pullrequests
|
||||||
|
|
||||||
def get_failed_gitea_commits(pull, url, gitea_org, repo, headers):
|
def get_failed_gitea_commits(pull, url, gitea_org, repo, headers):
|
||||||
failed_commits = []
|
failed_commits = []
|
||||||
@ -142,7 +142,7 @@ def get_failed_gitea_commits(pull, url, gitea_org, repo, headers):
|
|||||||
" | " + str(res_sta.reason))
|
" | " + str(res_sta.reason))
|
||||||
print(json.dumps(res_sta.json()))
|
print(json.dumps(res_sta.json()))
|
||||||
exit()
|
exit()
|
||||||
return(failed_commits)
|
return failed_commits
|
||||||
|
|
||||||
def get_github_repos(url, headers, gh_org):
|
def get_github_repos(url, headers, gh_org):
|
||||||
repositories = []
|
repositories = []
|
||||||
@ -164,7 +164,7 @@ def get_github_repos(url, headers, gh_org):
|
|||||||
print("The request status is: " + str(res.status_code) +
|
print("The request status is: " + str(res.status_code) +
|
||||||
" | " + str(res.reason))
|
" | " + str(res.reason))
|
||||||
break
|
break
|
||||||
return(repositories)
|
return repositories
|
||||||
|
|
||||||
def get_github_prs(url, headers, gh_org, repo):
|
def get_github_prs(url, headers, gh_org, repo):
|
||||||
pullrequests = []
|
pullrequests = []
|
||||||
@ -187,7 +187,7 @@ def get_github_prs(url, headers, gh_org, repo):
|
|||||||
print("The request status is: " + str(res.status_code) +
|
print("The request status is: " + str(res.status_code) +
|
||||||
" | " + str(res.reason))
|
" | " + str(res.reason))
|
||||||
break
|
break
|
||||||
return(pullrequests)
|
return pullrequests
|
||||||
|
|
||||||
def get_failed_gh_commits(pull, url, gh_org, repo, headers):
|
def get_failed_gh_commits(pull, url, gh_org, repo, headers):
|
||||||
failed_commits = []
|
failed_commits = []
|
||||||
@ -226,13 +226,10 @@ def get_failed_gh_commits(pull, url, gh_org, repo, headers):
|
|||||||
" | " + str(res_sta.reason))
|
" | " + str(res_sta.reason))
|
||||||
print(json.dumps(res_sta.json()))
|
print(json.dumps(res_sta.json()))
|
||||||
exit()
|
exit()
|
||||||
return(failed_commits)
|
return failed_commits
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
args = get_args()
|
args = get_args()
|
||||||
|
|
||||||
failed_commits = []
|
failed_commits = []
|
||||||
|
|
||||||
if args.debug:
|
if args.debug:
|
||||||
|
Reference in New Issue
Block a user