Re-enable image code in wireviz.py

This commit is contained in:
Daniel Rojas 2020-10-24 15:03:51 +02:00
parent addb180292
commit fc58108de0

View File

@ -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':