Skip to content

Commit fb52296

Browse files
committed
Fixed type annotations
1 parent 0787adf commit fb52296

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/llmtool/dfbscan/intra_dataflow_analyzer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from os import path
22
import json
33
import time
4-
from typing import List, Set, Optional, Dict
4+
from typing import List, Set, Optional, Dict, Union
55
from llmtool.LLM_utils import *
66
from llmtool.LLM_tool import *
77
from memory.syntactic.function import *
@@ -149,7 +149,7 @@ def _parse_response(
149149
r"Line:\s*([^;]+);"
150150
)
151151

152-
current_path = None
152+
current_path: Optional[Dict[str, Union[str, list]]] = None
153153
for line in response.splitlines():
154154
line = line.strip().lstrip("-").strip()
155155
if not line:
@@ -176,7 +176,8 @@ def _parse_response(
176176
"index": detail_match.group(4).strip(),
177177
"line": detail_match.group(5).strip(),
178178
}
179-
current_path["propagation_details"].append(detail)
179+
if isinstance(current_path["propagation_details"], list):
180+
current_path["propagation_details"].append(detail)
180181

181182
elif current_path is not None:
182183
paths.append(current_path)

0 commit comments

Comments
 (0)