From 882f58c7d1dfc935b22a4a9b2ae144d238d5f093 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 26 Nov 2017 14:37:46 +0100 Subject: print_tree.py: Style nits - Remove redundant parentheses in indent_print(). - Use unnumbered replacement fields with format(). --- examples/print_tree.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/print_tree.py b/examples/print_tree.py index 1a53a3a..09883d7 100644 --- a/examples/print_tree.py +++ b/examples/print_tree.py @@ -42,7 +42,7 @@ from kconfiglib import Kconfig, Symbol, Choice, MENU, COMMENT import sys def indent_print(s, indent): - print((" " * indent) + s) + print(" "*indent + s) def print_items(node, indent): while node: @@ -53,10 +53,11 @@ def print_items(node, indent): indent_print("choice", indent) elif node.item == MENU: - indent_print('menu "{0}"'.format(node.prompt[0]), indent) + indent_print('menu "{}"'.format(node.prompt[0]), indent) elif node.item == COMMENT: - indent_print('comment "{0}"'.format(node.prompt[0]), indent) + indent_print('comment "{}"'.format(node.prompt[0]), indent) + if node.list: print_items(node.list, indent + 2) -- cgit v1.2.3