Skip to content

Commit 7887232

Browse files
committed
purge basestring
1 parent d9ce63e commit 7887232

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

nibabel/filename_parser.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
''' Create filename pairs, triplets etc, with expected extensions '''
1010

1111
import os
12-
try:
13-
basestring
14-
except NameError:
15-
basestring = str
16-
1712
import pathlib
1813

1914

@@ -112,7 +107,7 @@ def types_filenames(template_fname, types_exts,
112107
>>> tfns == {'t1': '/path/test.funny', 't2': '/path/test.ext2'}
113108
True
114109
'''
115-
if not isinstance(template_fname, basestring):
110+
if not isinstance(template_fname, str):
116111
raise TypesFilenamesError('Need file name as input '
117112
'to set_filenames')
118113
if template_fname.endswith('.'):

0 commit comments

Comments
 (0)