From fc58108de05dab657b9eac5ac3a476ca69994b84 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Sat, 24 Oct 2020 15:03:51 +0200 Subject: [PATCH] Re-enable image code in wireviz.py --- src/wireviz/wireviz.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wireviz/wireviz.py b/src/wireviz/wireviz.py index c60e5d9..5f06759 100755 --- a/src/wireviz/wireviz.py +++ b/src/wireviz/wireviz.py @@ -53,11 +53,10 @@ def parse(yaml_input: str, file_out: (str, Path) = None, return_types: (None, st if len(yaml_data[sec]) > 0: if ty == dict: for key, attribs in yaml_data[sec].items(): - # TODO: take care of this image thing # The Image dataclass might need to open an image file with a relative path. - # image = attribs.get('image') - # if isinstance(image, dict): - # image['gv_dir'] = Path(file_out if file_out else '').parent # Inject context + image = attribs.get('image') + if isinstance(image, dict): + image['gv_dir'] = Path(file_out if file_out else '').parent # Inject context # store component templates only; do not generate instances yet if sec == 'connectors':