diff --git a/colab/plugins/data/base_importer.py b/colab/plugins/data/base_importer.py index 443e400..e7d7f07 100644 --- a/colab/plugins/data/base_importer.py +++ b/colab/plugins/data/base_importer.py @@ -11,4 +11,9 @@ class PluginDataImporter(object): @abc.abstractmethod def fetch_data(self): - raise NotImplementedError('fetchData not yet implemented') + raise NotImplementedError + fetch_data.is_abstract = True + + @abc.abstractmethod + def app_label(self): + raise NotImplementedError diff --git a/colab/plugins/data/tasks.py b/colab/plugins/data/tasks.py index cf2ef8a..9c65bdd 100644 --- a/colab/plugins/data/tasks.py +++ b/colab/plugins/data/tasks.py @@ -27,10 +27,10 @@ def register_tasks(): for item_name in dir(module): item = getattr(module, item_name) - if item is PluginDataImporter: - continue if callable(getattr(item, 'fetch_data', None)): + if getattr(item.fetch_data, 'is_abstract', False): + continue instance = item() task_name = '{}.{}'.format(module.__name__, item_name) task = app.task(name=task_name, bind=True)(instance.fetch_data) -- libgit2 0.21.2