Skip to content

Commit e8b0341

Browse files
committed
STY: flake8
1 parent 9476963 commit e8b0341

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

nipype/utils/filemanip.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ def _parse_mount_table(exit_code, output):
292292
pattern = re.compile(r'.*? on (/.*?) (?:type |\()([^\s,]+)(?:, |\)| )')
293293

294294
# (path, fstype) tuples, sorted by path length (longest first)
295-
mount_info = sorted((pattern.match(l).groups() for l in output.splitlines()),
295+
mount_info = sorted((pattern.match(l).groups()
296+
for l in output.splitlines()),
296297
key=lambda x: len(x[0]), reverse=True)
297298
cifs_paths = [path for path, fstype in mount_info
298299
if fstype.lower() == 'cifs']
@@ -777,8 +778,8 @@ def emptydirs(path, noexist_ok=False):
777778
elcont = os.listdir(path)
778779
if ex.errno == errno.ENOTEMPTY and not elcont:
779780
fmlogger.warning(
780-
'An exception was raised trying to remove old %s, but the path '
781-
'seems empty. Is it an NFS mount?. Passing the exception.',
781+
'An exception was raised trying to remove old %s, but the path'
782+
' seems empty. Is it an NFS mount?. Passing the exception.',
782783
path)
783784
elif ex.errno == errno.ENOTEMPTY and elcont:
784785
fmlogger.debug('Folder %s contents (%d items).', path, len(elcont))

nipype/utils/tests/test_filemanip.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
copyfiles, filename_to_list, list_to_filename, check_depends,
1717
split_filename, get_related_files)
1818

19-
import numpy as np
20-
2119

2220
def _ignore_atime(stat):
2321
return stat[:7] + stat[8:]
@@ -124,7 +122,7 @@ def test_copyfiles(_temp_analyze_files, _temp_analyze_files_prime):
124122
pth, fname = os.path.split(orig_img2)
125123
new_img2 = os.path.join(pth, 'secondfile.img')
126124
new_hdr2 = os.path.join(pth, 'secondfile.hdr')
127-
newfiles = copyfiles([orig_img1, orig_img2], [new_img1, new_img2])
125+
copyfiles([orig_img1, orig_img2], [new_img1, new_img2])
128126
assert os.path.exists(new_img1)
129127
assert os.path.exists(new_hdr1)
130128
assert os.path.exists(new_img2)

0 commit comments

Comments
 (0)