Skip to content

Commit dc49f3e

Browse files
author
Philip Guo
committed
got varags to print properly
1 parent 5a1c3c0 commit dc49f3e

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎v3/pg_encoder.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ def encode(self, dat):
163163

164164
printed_args = [e for e in argspec.args]
165165
if argspec.varargs:
166-
printed_args.extend(['*' + e for e in argspec.varargs])
166+
printed_args.append('*' + argspec.varargs)
167167
if argspec.keywords:
168-
printed_args.extend(['**' + e for e in argspec.keywords])
168+
printed_args.append('**' + argspec.keywords)
169169

170170
func_name = get_name(dat)
171171
pretty_name = func_name + '(' + ', '.join(printed_args) + ')'

‎v3/tests/backend-tests/varargs.golden‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"heap": {
2828
"1": [
2929
"FUNCTION",
30-
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
30+
"parrot(mandatory, mandatory2, *args, **kwargs)",
3131
null
3232
]
3333
},
@@ -78,7 +78,7 @@
7878
"heap": {
7979
"1": [
8080
"FUNCTION",
81-
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
81+
"parrot(mandatory, mandatory2, *args, **kwargs)",
8282
null
8383
],
8484
"2": [
@@ -146,7 +146,7 @@
146146
"heap": {
147147
"1": [
148148
"FUNCTION",
149-
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
149+
"parrot(mandatory, mandatory2, *args, **kwargs)",
150150
null
151151
],
152152
"2": [
@@ -216,7 +216,7 @@
216216
"heap": {
217217
"1": [
218218
"FUNCTION",
219-
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
219+
"parrot(mandatory, mandatory2, *args, **kwargs)",
220220
null
221221
],
222222
"2": [
@@ -256,7 +256,7 @@
256256
"heap": {
257257
"1": [
258258
"FUNCTION",
259-
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
259+
"parrot(mandatory, mandatory2, *args, **kwargs)",
260260
null
261261
]
262262
},

0 commit comments

Comments
 (0)