Spaces:
Sleeping
Sleeping
robinroy03
commited on
Commit
·
4afe03d
1
Parent(s):
12802eb
bug fix: line number
Browse files
utils.py
CHANGED
@@ -11,6 +11,7 @@ def prompt_generator(question: str, db_knn: dict) -> tuple[str, str, str]:
|
|
11 |
context += (data + "\n")
|
12 |
data = ast.literal_eval(data)
|
13 |
|
|
|
14 |
if data['type'] == "function" or data['type'] == "class":
|
15 |
line_number = f"#L{data['lineno'][0]}-L{data['lineno'][1]}"
|
16 |
|
|
|
11 |
context += (data + "\n")
|
12 |
data = ast.literal_eval(data)
|
13 |
|
14 |
+
line_number = ""
|
15 |
if data['type'] == "function" or data['type'] == "class":
|
16 |
line_number = f"#L{data['lineno'][0]}-L{data['lineno'][1]}"
|
17 |
|