Spaces:
Runtime error
Runtime error
Fix range error with docstrings
Browse files- utils/tree_utils.py +2 -0
utils/tree_utils.py
CHANGED
@@ -99,6 +99,8 @@ def grab_before_comments(func_node):
|
|
99 |
precomment += node.text.decode() + "\n"
|
100 |
last_comment_line = node.start_point[0]
|
101 |
elif node == func_node:
|
|
|
|
|
102 |
return precomment, start_byte
|
103 |
return precomment, start_byte
|
104 |
|
|
|
99 |
precomment += node.text.decode() + "\n"
|
100 |
last_comment_line = node.start_point[0]
|
101 |
elif node == func_node:
|
102 |
+
if precomment == "":
|
103 |
+
start_byte = node.start_byte
|
104 |
return precomment, start_byte
|
105 |
return precomment, start_byte
|
106 |
|