Skip to content

Commit

Permalink
population_template: pylint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lestropie committed Sep 18, 2024
1 parent ccbb9a4 commit 1927d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/population_template
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def parse_input_files(in_files, mask_files, contrasts, f_agg_weight=None, whites
agg_weights = dict((row[0].strip(), row[1].strip()) for row in reader)
pref = '^' + re.escape(get_common_prefix(list(agg_weights.keys())))
suff = re.escape(get_common_postfix(list(agg_weights.keys()))) + '$'
agg_weights = {re.sub(suff, '', re.sub(pref, '', key)):agg_weights[key] for key in agg_weights.keys()}
agg_weights = {re.sub(suff, '', re.sub(pref, '', item[0])):item[1] for item in agg_weights.items()}
for inp in inputs:
if inp.uid not in agg_weights:
raise MRtrixError('aggregation weight not found for input "%s"' % inp.uid)
Expand Down

0 comments on commit 1927d79

Please sign in to comment.