8
8
9
9
Requires Packages to be installed
10
10
"""
11
- from __future__ import print_function , division , unicode_literals , absolute_import
11
+ from __future__ import print_function , division , absolute_import
12
12
from future import standard_library
13
13
standard_library .install_aliases ()
14
14
from builtins import range , object , open , str , bytes
@@ -760,7 +760,6 @@ class BaseInterface(Interface):
760
760
This class cannot be instantiated.
761
761
762
762
"""
763
- input_spec = BaseInterfaceInputSpec
764
763
_version = None
765
764
_additional_metadata = []
766
765
_redirect_x = False
@@ -771,6 +770,16 @@ def __init__(self, from_file=None, **inputs):
771
770
raise Exception ('No input_spec in class: %s' %
772
771
self .__class__ .__name__ )
773
772
773
+ if isinstance (self .input_spec , dict ):
774
+ self .input_spec = type ("AnonyomousInputSpec" ,
775
+ (BaseInterfaceInputSpec ,),
776
+ self .input_spec )
777
+
778
+ if isinstance (self .output_spec , dict ):
779
+ self .output_spec = type ("AnonyomousOutputSpec" ,
780
+ (TraitedSpec ,),
781
+ self .output_spec )
782
+
774
783
self .inputs = self .input_spec (** inputs )
775
784
self .estimated_memory_gb = 0.25
776
785
self .num_threads = 1
0 commit comments