Skip to content

Commit

Permalink
Support multiple arguments for analysis initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
AryazE committed Mar 5, 2024
1 parent 29acd31 commit dbaa623
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dynapyt/utils/runtimeUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def load_analyses(analyses: List[Any]) -> List[BaseAnalysis]:
if ":" in ana:
parts = ana.split(":")
ana = parts[0]
conf = ":".join(parts[1:])
conf = tuple(parts[1:])
module_parts = ana.split(".")
module = importlib.import_module(".".join(module_parts[:-1]))
class_ = getattr(module, module_parts[-1])
if conf is not None:
res_analyses.append(class_(conf))
res_analyses.append(class_(*conf))
else:
res_analyses.append(class_())
elif isinstance(ana, BaseAnalysis):
Expand Down

0 comments on commit dbaa623

Please sign in to comment.