diff options
author | Théo de la Hogue | 2024-01-29 17:29:26 +0100 |
---|---|---|
committer | Théo de la Hogue | 2024-01-29 17:29:26 +0100 |
commit | e0344a225e8bb636da9678942b582b2658ae97aa (patch) | |
tree | d76024b4c40f26c74613e0f7e78c1ec1027eab00 | |
parent | 299fa2c8cfb256b4df7882b19ced5ab1319f7819 (diff) | |
download | argaze-e0344a225e8bb636da9678942b582b2658ae97aa.zip argaze-e0344a225e8bb636da9678942b582b2658ae97aa.tar.gz argaze-e0344a225e8bb636da9678942b582b2658ae97aa.tar.bz2 argaze-e0344a225e8bb636da9678942b582b2658ae97aa.tar.xz |
Allowing to instanciate ready-made argaze observers via dict.
-rw-r--r-- | src/argaze/DataFeatures.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py index a3b7034..6c77c37 100644 --- a/src/argaze/DataFeatures.py +++ b/src/argaze/DataFeatures.py @@ -503,6 +503,13 @@ class PipelineStepObject(): new_observers = observer_module.__observers__ + # dict: instanciate ready-made argaze observers + elif type(new_observers_value) == dict: + + for observer_type, observer_data in new_observers_value.items(): + + new_observers[observer_type] = eval(f'{observer_type}(**observer_data)') + except KeyError: pass |