File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -43,32 +43,3 @@ def list_interfaces(module):
43
43
if inspect .isclass (v ) and issubclass (v , Interface ):
44
44
iface_names .append (k )
45
45
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 ))
You can’t perform that action at this time.
0 commit comments