Match parse() return tuple order to input tuple order (#89)

Fixes #88.
This commit is contained in:
Jason 2020-07-15 02:07:15 -04:00 committed by GitHub
parent c8dc697845
commit 34cd9c2612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,12 +185,13 @@ def parse(yaml_input, file_out=None, return_types: (None, str, Tuple[str]) = Non
return_types = [t.lower() for t in return_types]
if 'png' in return_types:
returns.append(harness.png)
if 'svg' in return_types:
returns.append(harness.svg)
if 'harness' in return_types:
returns.append(harness)
for rt in return_types:
if rt == 'png':
returns.append(harness.png)
if rt == 'svg':
returns.append(harness.svg)
if rt == 'harness':
returns.append(harness)
return tuple(returns) if len(returns) != 1 else returns[0]