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"] patterns = page["patterns"]
if not isinstance(patterns, list): patterns = [patterns] if not isinstance(patterns, list): patterns = [patterns]
if do_sig: if do_sig:
inp = page.get("input", None) or "nothing" inp = page.get("input", None) or ""
oup = page.get("output", None) or "nothing" oup = page.get("output", None) or ""
page["header"] += f" ({inp} \u2192 {oup})" 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] page["op"] = [(p["signature"], p["startdir"], False) for p in patterns]
def fetch_recipe(root_data, recipe): def fetch_recipe(root_data, recipe):