From 70031378d80e3bc8c23d5a5028d226b374712fe3 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 29 Dec 2020 12:06:03 +0100 Subject: Modified formatting. --- scripts/pnodes.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'scripts/pnodes.py') diff --git a/scripts/pnodes.py b/scripts/pnodes.py index a753c7957..a5430c879 100755 --- a/scripts/pnodes.py +++ b/scripts/pnodes.py @@ -464,16 +464,14 @@ def gen_choices(choices): """Generate a choice 'when A | B ... Z =>' using elements of CHOICES.""" is_first = True for c in choices: + ch = prefix_name + c if is_first: - print(" ", end='') - print("when", end='') + is_first = False + print(" when " + ch, end='') else: print() - print(" ", end='') - print(" |", end='') - print(prefix_name + c, end='') - is_first = False - print("=>") + print(" | " + ch, end='') + print(" =>") def gen_get_format(formats, nodes, kinds): -- cgit v1.2.3