From 5fc4f8ae68aecf07f2ae4029dbcf997027489944 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 15 Jun 2020 04:33:33 +0100 Subject: [PATCH] Fix trailing whitespace in keyword.py (GH-20881) --- Tools/peg_generator/pegen/keywordgen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/peg_generator/pegen/keywordgen.py b/Tools/peg_generator/pegen/keywordgen.py index 639f01bf237..53638b17e61 100644 --- a/Tools/peg_generator/pegen/keywordgen.py +++ b/Tools/peg_generator/pegen/keywordgen.py @@ -67,8 +67,8 @@ def main(): all_keywords = sorted(list(gen.callmakervisitor.keyword_cache.keys()) + EXTRA_KEYWORDS) all_soft_keywords = sorted(gen.callmakervisitor.soft_keywords) - keywords = " " + ",\n ".join(map(repr, all_keywords)) - soft_keywords = " " + ",\n ".join(map(repr, all_soft_keywords)) + keywords = "" if not all_keywords else " " + ",\n ".join(map(repr, all_keywords)) + soft_keywords = "" if not all_soft_keywords else " " + ",\n ".join(map(repr, all_soft_keywords)) thefile.write(TEMPLATE.format(keywords=keywords, soft_keywords=soft_keywords))