Vipitis commited on
Commit
80cd783
1 Parent(s): 10a35db

Fix range error with docstrings

Browse files
Files changed (1) hide show
  1. 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