Skip to content

Commit 24f1276

Browse files
committed
Linter fixes
1 parent 49577d5 commit 24f1276

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

easybuild/tools/github.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,8 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_
10381038
commit_msg = "adding easyblocks: %s" % ', '.join(os.path.basename(p) for p in file_info['paths_in_repo'])
10391039
else:
10401040
msg = ''
1041-
modified_files = [os.path.basename(p) for new, p in zip(file_info['new'], file_info['paths_in_repo']) if not new]
1041+
modified_files = [os.path.basename(p) for new, p in zip(file_info['new'], file_info['paths_in_repo'])
1042+
if not new]
10421043
if modified_files:
10431044
msg += '\nModified: ' + ', '.join(modified_files)
10441045
if paths['files_to_delete']:
@@ -1084,8 +1085,8 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_
10841085
# only consider new easyconfig files for dependencies (not updated ones)
10851086
for idx in range(len(all_dep_info['ecs'])):
10861087
if all_dep_info['new'][idx]:
1087-
for key in dep_info:
1088-
dep_info[key].append(all_dep_info[key][idx])
1088+
for key, info in dep_info.items():
1089+
info.append(all_dep_info[key][idx])
10891090

10901091
# checkout target branch
10911092
if pr_branch is None:
@@ -1698,7 +1699,7 @@ def post_pr_labels(pr, labels):
16981699

16991700
pr_url = g.repos[pr_target_account][pr_target_repo].issues[pr]
17001701
try:
1701-
status, data = pr_url.labels.post(body=labels)
1702+
status, _ = pr_url.labels.post(body=labels)
17021703
if status == HTTP_STATUS_OK:
17031704
print_msg("Added labels %s to PR#%s" % (', '.join(labels), pr), log=_log, prefix=False)
17041705
return True
@@ -1997,9 +1998,9 @@ def new_pr(paths, ecs, title=None, descr=None, commit_msg=None):
19971998
patch = patch[0]
19981999
elif isinstance(patch, dict):
19992000
patch_info = {}
2000-
for key in patch.keys():
2001-
patch_info[key] = patch[key]
2002-
if 'name' not in patch_info.keys():
2001+
for key, cur_patch in patch.items():
2002+
patch_info[key] = cur_patch
2003+
if 'name' not in patch_info:
20032004
raise EasyBuildError("Wrong patch spec '%s', when using a dict 'name' entry must be supplied",
20042005
str(patch))
20052006
patch = patch_info['name']

0 commit comments

Comments
 (0)