@@ -462,26 +462,28 @@ def collect_additional_outputs(self, inputs, output_dir, outputs):
462
462
try :
463
463
additional_out [fld .name ] = getattr (inputs , fld .name )
464
464
except AttributeError :
465
- if (
466
- fld .default is None or fld .default == attr .NOTHING
467
- ) and not fld .metadata : # TODO: is it right?
468
- raise AttributeError ("File has to have default value or metadata" )
469
- elif fld .default != attr .NOTHING :
470
- additional_out [fld .name ] = self ._field_defaultvalue (fld , output_dir )
471
- elif fld .metadata :
472
- if (
473
- fld .type in [int , float , bool , str , list ]
474
- and "callable" not in fld .metadata
475
- ):
476
- raise AttributeError (
477
- f"{ fld .type } has to have a callable in metadata"
478
- )
479
- additional_out [fld .name ] = self ._field_metadata (
480
- fld , inputs , output_dir , outputs
481
- )
465
+ pass
482
466
else :
483
467
if fld .type in (File , MultiOutputFile , Directory , Path ):
484
468
additional_out [fld .name ] = Path (additional_out [fld .name ]).absolute ()
469
+ continue
470
+ if (
471
+ fld .default is None or fld .default == attr .NOTHING
472
+ ) and not fld .metadata : # TODO: is it right?
473
+ raise AttributeError ("File has to have default value or metadata" )
474
+ elif fld .default != attr .NOTHING :
475
+ additional_out [fld .name ] = self ._field_defaultvalue (fld , output_dir )
476
+ elif fld .metadata :
477
+ if (
478
+ fld .type in [int , float , bool , str , list ]
479
+ and "callable" not in fld .metadata
480
+ ):
481
+ raise AttributeError (
482
+ f"{ fld .type } has to have a callable in metadata"
483
+ )
484
+ additional_out [fld .name ] = self ._field_metadata (
485
+ fld , inputs , output_dir , outputs
486
+ )
485
487
return additional_out
486
488
487
489
def generated_output_names (self , inputs , output_dir ):
0 commit comments