Skip to content

Commit

Permalink
Do not lazy-load modules
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Nov 9, 2023
1 parent ea9de6b commit 71ba788
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions common/lib/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ def get_label(self, parameters=None, default="Query"):
return parameters["filename"]
elif parameters.get("board") and "datasource" in parameters:
return parameters["datasource"] + "/" + parameters["board"]
elif "datasource" in parameters and parameters["datasource"] in self.get_modules().datasources:
return self.get_modules().datasources[parameters["datasource"]]["name"] + " Dataset"
elif "datasource" in parameters and parameters["datasource"] in self.modules.datasources:
return self.modules.datasources[parameters["datasource"]]["name"] + " Dataset"
else:
return default

Expand Down Expand Up @@ -1173,7 +1173,7 @@ def update_version(self, version):
try:
# this fails if the processor type is unknown
# edge case, but let's not crash...
processor_path = self.get_modules().processors.get(self.data["type"]).filepath
processor_path = self.modules.processors.get(self.data["type"]).filepath
except AttributeError:
processor_path = ""

Expand Down Expand Up @@ -1346,7 +1346,7 @@ def get_compatible_processors(self, user=None):
:return dict: Compatible processors, `name => class` mapping
"""
processors = self.get_modules().processors
processors = self.modules.processors

available = {}
for processor_type, processor in processors.items():
Expand Down Expand Up @@ -1406,7 +1406,7 @@ def get_own_processor(self):
:return: Processor class, or `None` if not available.
"""
processor_type = self.parameters.get("type", self.data.get("type"))
return self.get_modules().processors.get(processor_type)
return self.modules.processors.get(processor_type)


def get_available_processors(self, user=None):
Expand Down

0 comments on commit 71ba788

Please sign in to comment.