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 @@ -1704,7 +1704,7 @@ and classes for traversing abstract syntax trees:
1704
1704
value=Name(id='data', ctx=Load()),
1705
1705
slice=Constant(value=node.id),
1706
1706
ctx=node.ctx
1707
- ), node)
1707
+ )
1708
1708
1709
1709
Keep in mind that if the node you're operating on has child nodes you must
1710
1710
either transform the child nodes yourself or call the :meth: `generic_visit `
Original file line number Diff line number Diff line change @@ -443,11 +443,11 @@ class NodeTransformer(NodeVisitor):
443
443
class RewriteName(NodeTransformer):
444
444
445
445
def visit_Name(self, node):
446
- return copy_location( Subscript(
446
+ return Subscript(
447
447
value=Name(id='data', ctx=Load()),
448
448
slice=Constant(value=node.id),
449
449
ctx=node.ctx
450
- ), node)
450
+ )
451
451
452
452
Keep in mind that if the node you're operating on has child nodes you must
453
453
either transform the child nodes yourself or call the :meth:`generic_visit`
You can’t perform that action at this time.
0 commit comments