mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-38870: Don't put unnecessary parentheses on class declarations in ast.parse (GH-20134)
This commit is contained in:
parent
ce4a753dcb
commit
25160cdc47
2 changed files with 15 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue