@@ -362,26 +362,23 @@ def _run_interface(self, runtime):
362362 if isinstance (in_dict [key ][0 ], np .ndarray ):
363363 saved_variables .append (key )
364364 else :
365- iflogger .info ('One of the keys in the input file, {k}, is not a Numpy array' .format (k = key ))
365+ iflogger .info ('One of the keys in the input file, %s, is '
366+ 'not a Numpy array' , key )
366367
367368 if len (saved_variables ) > 1 :
368- iflogger .info (
369- '{N} variables found:' .format (N = len (saved_variables )))
369+ iflogger .info ('%i variables found:' , len (saved_variables ))
370370 iflogger .info (saved_variables )
371371 for variable in saved_variables :
372- iflogger .info (
373- '...Converting {var} - type {ty} - to\
374- CSV' .format (var = variable , ty = type (in_dict [variable ]))
375- )
376- matlab2csv (
377- in_dict [variable ], variable , self .inputs .reshape_matrix )
372+ iflogger .info ('...Converting %s - type %s - to CSV' ,
373+ variable , type (in_dict [variable ]))
374+ matlab2csv (in_dict [variable ], variable , self .inputs .reshape_matrix )
378375 elif len (saved_variables ) == 1 :
379376 _ , name , _ = split_filename (self .inputs .in_file )
380377 variable = saved_variables [0 ]
381- iflogger .info ('Single variable found {var} , type {ty}:' . format (
382- var = variable , ty = type (in_dict [variable ]) ))
383- iflogger .info ('...Converting {var} to CSV from {f}' . format (
384- var = variable , f = self .inputs .in_file ) )
378+ iflogger .info ('Single variable found %s , type %s:' , variable ,
379+ type (in_dict [variable ]))
380+ iflogger .info ('...Converting %s to CSV from %s' , variable ,
381+ self .inputs .in_file )
385382 matlab2csv (in_dict [variable ], name , self .inputs .reshape_matrix )
386383 else :
387384 iflogger .error ('No values in the MATLAB file?!' )
@@ -396,8 +393,8 @@ def _list_outputs(self):
396393 if isinstance (in_dict [key ][0 ], np .ndarray ):
397394 saved_variables .append (key )
398395 else :
399- iflogger .error ('One of the keys in the input file, {k} , is\
400- not a Numpy array'. format ( k = key ) )
396+ iflogger .error ('One of the keys in the input file, %s , is '
397+ ' not a Numpy array', key )
401398
402399 if len (saved_variables ) > 1 :
403400 outputs ['csv_files' ] = replaceext (saved_variables , '.csv' )
@@ -555,28 +552,25 @@ def _run_interface(self, runtime):
555552 iflogger .info ('Column headings have been provided:' )
556553 headings = self .inputs .column_headings
557554 else :
558- iflogger .info (
559- 'Column headings not provided! Pulled from input filenames:' )
555+ iflogger .info ('Column headings not provided! Pulled from input filenames:' )
560556 headings = remove_identical_paths (self .inputs .in_files )
561557
562558 if isdefined (self .inputs .extra_field ):
563559 if isdefined (self .inputs .extra_column_heading ):
564560 extraheading = self .inputs .extra_column_heading
565- iflogger .info ('Extra column heading provided: {col}' .format (
566- col = extraheading ))
561+ iflogger .info ('Extra column heading provided: %s' , extraheading )
567562 else :
568563 extraheading = 'type'
569- iflogger .info (
570- 'Extra column heading was not defined. Using "type"' )
564+ iflogger .info ('Extra column heading was not defined. Using "type"' )
571565 headings .append (extraheading )
572566 extraheadingBool = True
573567
574568 if len (self .inputs .in_files ) == 1 :
575569 iflogger .warn ('Only one file input!' )
576570
577571 if isdefined (self .inputs .row_headings ):
578- iflogger .info ('Row headings have been provided. Adding "labels"\
579- column header.' )
572+ iflogger .info ('Row headings have been provided. Adding "labels"'
573+ ' column header.' )
580574 prefix = '"{p}","' .format (p = self .inputs .row_heading_title )
581575 csv_headings = prefix + '","' .join (itertools .chain (
582576 headings )) + '"\n '
@@ -1310,7 +1304,7 @@ def merge_rois(in_files, in_idxs, in_ref,
13101304 # to avoid memory errors
13111305 if op .splitext (in_ref )[1 ] == '.gz' :
13121306 try :
1313- iflogger .info ('uncompress %i' % in_ref )
1307+ iflogger .info ('uncompress %i' , in_ref )
13141308 sp .check_call (['gunzip' , in_ref ], stdout = sp .PIPE , shell = True )
13151309 in_ref = op .splitext (in_ref )[0 ]
13161310 except :
0 commit comments