mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
fix: handle RecursionError during tree traversal in linter
This commit is contained in:
parent
3794cf941f
commit
af7aaad903
1 changed files with 6 additions and 1 deletions
|
@ -221,7 +221,12 @@ def basic_lint(fname, code):
|
|||
|
||||
tree = parser.parse(bytes(code, "utf-8"))
|
||||
|
||||
errors = traverse_tree(tree.root_node)
|
||||
try:
|
||||
errors = traverse_tree(tree.root_node)
|
||||
except RecursionError:
|
||||
print(f"Unable to lint {fname} due to RecursionError")
|
||||
return
|
||||
|
||||
if not errors:
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue