Skip to content
Snippets Groups Projects
Commit 013f21f9 authored by Stefano Borini's avatar Stefano Borini
Browse files

Passing through the information to traits

parent 857f5a5d
No related branches found
No related tags found
1 merge request!158Introduces base class and interface for the factories
......@@ -17,8 +17,8 @@ class BaseFactory(HasStrictTraits):
#: in your subclass.
plugin = Instance(Plugin, allow_none=False)
def __init__(self, plugin):
super(BaseFactory, self).__init__(plugin=plugin)
def __init__(self, plugin, *args, **kwargs):
super(BaseFactory, self).__init__(plugin=plugin, *args, **kwargs)
self.name = self.get_name()
identifier = self.get_identifier()
......
......@@ -38,8 +38,11 @@ class BaseDataSourceFactory(BaseFactory):
#: Define this to your DataSourceModel
model_class = Type(BaseDataSourceModel, allow_none=False)
def __init__(self, plugin):
super(BaseDataSourceFactory, self).__init__(plugin=plugin)
def __init__(self, plugin, *args, **kwargs):
super(BaseDataSourceFactory, self).__init__(
plugin=plugin,
*args,
**kwargs)
self.data_source_class = self.get_data_source_class()
self.model_class = self.get_model_class()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment