Skip to content

Commit b2c9867

Browse files
committed
remove unused function in scripts/instance
1 parent 578970e commit b2c9867

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

nipype/scripts/instance.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,3 @@ def list_interfaces(module):
4343
if inspect.isclass(v) and issubclass(v, Interface):
4444
iface_names.append(k)
4545
return iface_names
46-
47-
48-
def instantiate_this(class_path, init_args):
49-
"""Instantiates an object of the class in class_path with the given
50-
initialization arguments.
51-
52-
Parameters
53-
----------
54-
class_path: str
55-
String to the path of the class.
56-
57-
init_args: dict
58-
Dictionary of the names and values of the initialization arguments
59-
to the class
60-
61-
Return
62-
------
63-
Instantiated object
64-
"""
65-
try:
66-
cls = import_this(class_path)
67-
if init_args is None:
68-
return cls()
69-
else:
70-
return cls(**init_args)
71-
except:
72-
raise RuntimeError('Error instantiating class {} '
73-
'with the arguments {}.'.format(class_path,
74-
init_args))

0 commit comments

Comments
 (0)