Skip to content

Commit

Permalink
[doc] use cst node in ensure_type in best practice doc (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmylai authored Aug 5, 2020
1 parent 17bde3b commit 2e788a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You could instead write something like::
def visit_Call(self, node: cst.Call) -> None:
# Store all calls in a stack
if m.matches(node.func, m.Name()):
self.call_stack.append(cst.ensure_type(node.func, m.Name).value)
self.call_stack.append(cst.ensure_type(node.func, cst.Name).value)

def leave_Call(self, original_node: cst.Call) -> None:
# Pop the latest call off the stack
Expand Down

0 comments on commit 2e788a2

Please sign in to comment.