Skip to content

Commit 07555f2

Browse files
kvid17o2
authored andcommitted
Explain unexpeced top-level type (#383)
Might help in reported issues like #342
1 parent 152f97c commit 07555f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wireviz/wireviz.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def parse(
8888
raise Exception("No output formats or return types specified")
8989

9090
yaml_data, yaml_file = _get_yaml_data_and_path(inp)
91+
assert isinstance(
92+
yaml_data, dict
93+
), f"Expected a dict as top-level YAML input, but got: {type(yaml_data)}"
9194
if output_formats:
9295
# need to write data to file, determine output directory and filename
9396
output_dir = _get_output_dir(yaml_file, output_dir)

0 commit comments

Comments
 (0)