Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 578aa56

Browse files
committed
Fix typo in unparsing of a class definition.
1 parent 927ccd2 commit 578aa56

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Demo/parser/test_unparse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ def test_dict_comprehension(self):
156156
def test_class_decorators(self):
157157
self.check_roundtrip(class_decorator)
158158

159+
def test_class_definition(self):
160+
self.check_roundtrip("class A(metaclass=type, *[], **{}): pass")
159161

160162
class DirectoryTestCase(ASTTestCase):
161163
"""Test roundtrip behaviour on all files in Lib and Lib/test."""

Demo/parser/unparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _ClassDef(self, t):
215215
if t.kwargs:
216216
if comma: self.write(", ")
217217
else: comma = True
218-
self.write("*")
218+
self.write("**")
219219
self.dispatch(t.kwargs)
220220
self.write(")")
221221

0 commit comments

Comments
 (0)