Skip to content

Commit 2f55a70

Browse files
committed
RF: Use list comprehension
1 parent 3d64ace commit 2f55a70

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

nipype/algorithms/confounds.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,9 @@ def _list_outputs(self):
464464
return outputs
465465

466466
def _make_headers(self, num_col):
467-
headers = []
468467
header = self.inputs.header_prefix if \
469468
isdefined(self.inputs.header_prefix) else self._header
470-
for i in range(num_col):
471-
headers.append(header + '{:02d}'.format(i))
469+
headers = ['{}{:02d}'.format(header, i) for i in range(num_col)]
472470
return '\t'.join(headers)
473471

474472

0 commit comments

Comments
 (0)