Skip to content

Commit

Permalink
Comment the method and move "import ast" into the debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
isanbard committed Feb 26, 2022
1 parent aa0a97a commit e5e5681
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions yapf/pyparser/pyparser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
GetNextTokenIndex: Get the index of the next token after a given position.
GetPrevTokenIndex: Get the index of the previous token before a given
position.
TokenStart: Convenience function to return the token's start as a tuple.
TokenEnd: Convenience function to return the token's end as a tuple.
"""

import ast


def FindTokensInRange(logical_lines, node):
"""Get a list of tokens within the range [start, end)."""
Expand Down Expand Up @@ -91,4 +91,6 @@ def TokenEnd(node):


def AstDump(node):
"""Debugging code."""
import ast
print(ast.dump(node, include_attributes=True, indent=4))

0 comments on commit e5e5681

Please sign in to comment.