diff --git a/src/wireviz/wireviz.py b/src/wireviz/wireviz.py index 0409385d..2fee9072 100755 --- a/src/wireviz/wireviz.py +++ b/src/wireviz/wireviz.py @@ -86,9 +86,8 @@ def parse( raise Exception("No output formats or return types specified") yaml_data, yaml_file = _get_yaml_data_and_path(inp) - assert isinstance( - yaml_data, dict - ), f"Expected a dict/map as top-level YAML input, but got: {type(yaml_data)}" + if not isinstance(yaml_data, dict): + raise TypeError(f"Expected a dict/map as top-level YAML input, but got: {type(yaml_data)}") if output_formats: # need to write data to file, determine output directory and filename output_dir = _get_output_dir(yaml_file, output_dir)