File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ and classes for traversing abstract syntax trees:
308
308
value=Name(id='data', ctx=Load()),
309
309
slice=Index(value=Constant(value=node.id)),
310
310
ctx=node.ctx
311
- ), node)
311
+ )
312
312
313
313
Keep in mind that if the node you're operating on has child nodes you must
314
314
either transform the child nodes yourself or call the :meth: `generic_visit `
Original file line number Diff line number Diff line change @@ -408,11 +408,11 @@ class NodeTransformer(NodeVisitor):
408
408
class RewriteName(NodeTransformer):
409
409
410
410
def visit_Name(self, node):
411
- return copy_location( Subscript(
411
+ return Subscript(
412
412
value=Name(id='data', ctx=Load()),
413
413
slice=Index(value=Str(s=node.id)),
414
414
ctx=node.ctx
415
- ), node)
415
+ )
416
416
417
417
Keep in mind that if the node you're operating on has child nodes you must
418
418
either transform the child nodes yourself or call the :meth:`generic_visit`
You can’t perform that action at this time.
0 commit comments