Skip to content

Commit 12cd826

Browse files
committed
Break fixes.
1 parent 7c0941a commit 12cd826

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/echo/fuzz/genseq.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def make_name_ref(cls, arg: NameDef) -> 'NameRef':
174174
def make_getattr(cls, lhs: 'Expr', name: Text) -> 'Expr':
175175
return cls(ExprKind.GETATTR, (lhs,), str_payload=name)
176176

177-
def __init__(self, kind: ExprKind, operands: Tuple['Expr', ...], str_payload: Optional[str] = None):
177+
def __init__(self, kind: ExprKind, operands: Tuple['Expr', ...],
178+
str_payload: Optional[str] = None):
178179
assert isinstance(operands, tuple), operands
179180
self.kind = kind
180181
self.operands = operands
@@ -189,15 +190,14 @@ def _format(self) -> Text:
189190
if self.kind == ExprKind.NONE_LITERAL:
190191
return 'None'
191192
if self.kind == ExprKind.STR_LITERAL:
192-
return repr(self.operands[0])
193+
return repr(self.str_payload)
193194
if self.kind == ExprKind.INVOKE:
194-
lhs, args = self.operands
195-
assert isinstance(args, tuple), args
195+
lhs, *args = self.operands
196196
return '{}({})'.format(
197197
lhs.format(), ', '.join(a.format() for a in args))
198198
if self.kind == ExprKind.GETATTR:
199199
return '({}).{}'.format(self.operands[0].format(),
200-
self.operands[1])
200+
self.str_payload)
201201
raise NotImplementedError(self)
202202

203203
def format(self, indent: int = 0) -> Text:

0 commit comments

Comments
 (0)