diff options
Diffstat (limited to 'as_string.py')
-rw-r--r-- | as_string.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/as_string.py b/as_string.py index b7e62571..72c5b6c3 100644 --- a/as_string.py +++ b/as_string.py @@ -399,6 +399,8 @@ class AsStringVisitor(object): def visit_tuple(self, node): """return an astroid.Tuple node as string""" + if len(node.elts) == 1: + return '(%s, )' % node.elts[0].accept(self) return '(%s)' % ', '.join([child.accept(self) for child in node.elts]) def visit_unaryop(self, node): |