From 25160cdc4775a1ddb4e37c8bf5a6e31ad9c146ed Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Sun, 17 May 2020 00:53:25 +0300 Subject: bpo-38870: Don't put unnecessary parentheses on class declarations in ast.parse (GH-20134) --- Lib/ast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/ast.py') diff --git a/Lib/ast.py b/Lib/ast.py index 1de37b9567..d6cb334432 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -930,7 +930,7 @@ class _Unparser(NodeVisitor): self.fill("@") self.traverse(deco) self.fill("class " + node.name) - with self.delimit("(", ")"): + with self.delimit_if("(", ")", condition = node.bases or node.keywords): comma = False for e in node.bases: if comma: -- cgit v1.2.1