Skip to content

Commit 5fc4f8a

Browse files
authored
Fix trailing whitespace in keyword.py (GH-20881)
1 parent 78319e3 commit 5fc4f8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/peg_generator/pegen/keywordgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def main():
6767
all_keywords = sorted(list(gen.callmakervisitor.keyword_cache.keys()) + EXTRA_KEYWORDS)
6868
all_soft_keywords = sorted(gen.callmakervisitor.soft_keywords)
6969

70-
keywords = " " + ",\n ".join(map(repr, all_keywords))
71-
soft_keywords = " " + ",\n ".join(map(repr, all_soft_keywords))
70+
keywords = "" if not all_keywords else " " + ",\n ".join(map(repr, all_keywords))
71+
soft_keywords = "" if not all_soft_keywords else " " + ",\n ".join(map(repr, all_soft_keywords))
7272
thefile.write(TEMPLATE.format(keywords=keywords, soft_keywords=soft_keywords))
7373

7474

0 commit comments

Comments
 (0)