feat: completely dynamified the datasource import
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -78,8 +78,6 @@ class Downloader:
|
||||
if page_type in self._registered_pages:
|
||||
return
|
||||
|
||||
print(page_type)
|
||||
|
||||
self._registered_pages[page_type].add(page_type(
|
||||
download_options=self.download_options,
|
||||
fetch_options=self.fetch_options,
|
||||
@@ -97,6 +95,7 @@ class Downloader:
|
||||
def scan_for_pages(self, **kwargs):
|
||||
# assuming the wanted pages are the leaf classes of the interface
|
||||
from .. import pages
|
||||
|
||||
leaf_classes = []
|
||||
|
||||
class_list = [Page]
|
||||
@@ -110,6 +109,9 @@ class Downloader:
|
||||
else:
|
||||
class_list.extend(class_subclasses)
|
||||
|
||||
if Page in leaf_classes:
|
||||
self.LOGGER.warn("couldn't find any data source")
|
||||
return
|
||||
for leaf_class in leaf_classes:
|
||||
self.register_page(leaf_class, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user