Skip to content

Commit 9ddd37d

Browse files
author
M.Notter
committed
Corrects flake8 issues
1 parent c615408 commit 9ddd37d

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

atlasreader/atlasreader.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@ def process_img(stat_img, cluster_extent, voxel_thresh=1.96, direction="both"):
493493
# ensure that threshold is not greater than most extreme value in image
494494
max_data_val = np.nan_to_num(np.abs(stat_img.get_fdata())).max()
495495
if voxel_thresh > max_data_val:
496-
warn_msg = f"Threshold value '{voxel_thresh}' is greater than max value in image '{max_data_val}'."
497-
warn_msg += " Will select zero voxels."
496+
warn_msg = f"Threshold value '{voxel_thresh}' is greater than max value "
497+
warn_msg += "in image '{max_data_val}'. Will select zero voxels."
498498
warnings.warn(warn_msg)
499499
empty = np.zeros(stat_img.shape + (1,))
500500
return image.new_img_like(stat_img, empty)
@@ -901,9 +901,7 @@ def create_output(
901901

902902
# get template image for plotting cluster maps
903903
bgimg = nb.load(
904-
resource_filename(
905-
"atlasreader", "data/templates/MNI152_T1_1mm_brain.nii.gz"
906-
)
904+
resource_filename("atlasreader", "data/templates/MNI152_T1_1mm_brain.nii.gz")
907905
)
908906

909907
# plot clusters

atlasreader/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,7 @@ def queryatlas_main():
208208
for atlas in check_atlases(opts.atlas):
209209
label = read_atlas_peak(atlas, opts.coordinate, opts.prob_thresh)
210210
if isinstance(label, list):
211-
label = "\n{}".format(" " * 26).join(
212-
["{:>2}% {}".format(*e) for e in label]
213-
)
211+
label = "\n{}".format(" " * 26).join(["{:>2}% {}".format(*e) for e in label])
214212
print(f"{atlas.atlas:<25} {label}")
215213

216214

0 commit comments

Comments
 (0)