Skip to content

Commit c703be0

Browse files
committed
switch to set
1 parent e57007d commit c703be0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patchwork/common/tools/code_edit_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CodeEditTool(Tool, tool_name="code_edit_tool"):
1111
def __init__(self, path: str):
1212
super().__init__()
1313
self.repo_path = Path(path)
14-
self.modified_files = []
14+
self.modified_files = set()
1515

1616
@property
1717
def json_schema(self) -> dict:
@@ -98,7 +98,7 @@ def execute(
9898
return f"Error: Unknown action {command}"
9999

100100
if command in {"create", "str_replace", "insert"}:
101-
self.modified_files.append(path.lstrip("/"))
101+
self.modified_files.update(path.lstrip("/"))
102102

103103
return result
104104

0 commit comments

Comments
 (0)