Fix up manual_pattern sig

This commit is contained in:
Alwinfy 2022-05-23 15:09:22 -04:00
parent 73a744ad89
commit 772b46dfea
No known key found for this signature in database
GPG key ID: 2CCB99445F0C949E

View file

@ -206,9 +206,11 @@ def fixup_pattern(do_sig, root_data, page):
patterns = page["patterns"]
if not isinstance(patterns, list): patterns = [patterns]
if do_sig:
inp = page.get("input", None) or "nothing"
oup = page.get("output", None) or "nothing"
page["header"] += f" ({inp} \u2192 {oup})"
inp = page.get("input", None) or ""
oup = page.get("output", None) or ""
pipe = f"{inp} \u2192 {oup}".strip()
suffix = f" ({pipe})" if inp or oup else ""
page["header"] += suffix
page["op"] = [(p["signature"], p["startdir"], False) for p in patterns]
def fetch_recipe(root_data, recipe):