From e1da7aa4d041d25e4fd5fd1f603f4c28d32b1392 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 25 May 2019 16:49:35 +0200 Subject: Display n/m/y without quotes These are constant symbols, which is why the quotes showed up. Special-case them to remove the quotes, to match what people expect. Internally, n/m/y without quotes is taken as a shorthand for "n"/"m"/"y". --- kconfiglib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 8112e11..55d08f6 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -5652,7 +5652,9 @@ def standard_sc_expr_str(sc): See expr_str(). """ if sc.__class__ is Symbol: - return '"{}"'.format(escape(sc.name)) if sc.is_constant else sc.name + if sc.is_constant and sc.name not in ("n", "m", "y"): + return '"{}"'.format(escape(sc.name)) + return sc.name # Choice return "".format(sc.name) if sc.name else "" -- cgit v1.2.3