Skip to content

Commit d8eee6a

Browse files
committed
STY: Pacify flake8 a bit
1 parent ffb2bbd commit d8eee6a

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

fmriprep/utils/telemetry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def process_crashfile(crashfile):
110110

111111
# Extract any other possible metadata in the crash file
112112
for k, v in crash_info.items():
113-
strv = list(_chunks(str(v)))
113+
strv = _chunks(str(v))
114114
if len(strv) == 1:
115115
scope.set_extra(k, strv[0])
116116
else:
@@ -129,7 +129,7 @@ def process_crashfile(crashfile):
129129
break
130130

131131
message = issue_title + '\n\n'
132-
message += exception_text[-(8192 - len(message)) :]
132+
message += exception_text[-8192:]
133133
if fingerprint:
134134
sentry_sdk.add_breadcrumb(message=fingerprint, level='fatal')
135135
else:
@@ -182,7 +182,7 @@ def _chunks(string, length=CHUNK_SIZE):
182182
['som', 'e l', 'ong', 'er ', 'str', 'ing', '.']
183183
184184
"""
185-
return (string[i : i + length] for i in range(0, len(string), length))
185+
return [string[i : i + length] for i in range(0, len(string), length)]
186186

187187

188188
def setup_migas(init_ping: bool = True) -> None:

fmriprep/workflows/bold/outputs.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -823,21 +823,18 @@ def init_ds_volumes_wf(
823823
[
824824
(inputnode, resampler, [('ref_file', 'reference_image')])
825825
for resampler in resamplers
826-
]
827-
+ [
826+
] + [
828827
(boldref2target, resampler, [('out', 'transforms')])
829828
for resampler in resamplers
830-
]
831-
+ [
829+
] + [
832830
(inputnode, datasink, [
833831
('source_files', 'source_file'),
834832
('space', 'space'),
835833
('cohort', 'cohort'),
836834
('resolution', 'resolution'),
837835
])
838836
for datasink in datasinks
839-
]
840-
+ [
837+
] + [
841838
(resampler, datasink, [("output_image", "in_file")])
842839
for resampler, datasink in zip(resamplers, datasinks)
843840
]

0 commit comments

Comments
 (0)