Skip to content

Commit

Permalink
fix: codeanalysis bug (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreysingla11 authored Dec 17, 2024
1 parent ef86421 commit e9aafc8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def execute(
) -> CreateCodeMapResponse:
if "create_fqdn" not in metadata:
metadata["create_fqdn"] = True
if "create_index" not in metadata:
metadata["create_index"] = True
if "is_python" not in metadata:
metadata["is_python"] = True

Expand Down Expand Up @@ -123,7 +125,8 @@ def _process(self, status: Dict[str, Any], metadata: Dict[str, Any]) -> None:
self.load_all_fqdns()
status = self._update_status(self.REPO_DIR, Status.LOADING_INDEX)
if status["status"] == Status.LOADING_INDEX:
self.create_index(metadata["is_python"])
if metadata["create_index"]:
self.create_index(metadata["is_python"])
status = self._update_status(self.REPO_DIR, Status.COMPLETED)
except Exception as e:
self._update_status(self.REPO_DIR, Status.FAILED)
Expand Down
1 change: 0 additions & 1 deletion python/composio/tools/local/codeanalysis/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class CodeAnalysisTool(LocalTool, autoload=True):
"tree_sitter==0.21.3",
"deeplake>3.9,<4",
"sentence-transformers",
"tokenizers>=0.20,<0.21",
"tree_sitter_languages",
"git+https://github.com/DataDog/jedi.git@92d0c807b0dcd115b1ffd0a4ed21e44db127c2fb#egg=jedi",
"PyJWT", # deeplake/client/client.py:41
Expand Down
1 change: 0 additions & 1 deletion python/composio/tools/local/filetool/actions/git_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def git_reset_cmd(commit_id: str) -> str:
"git remote get-url origin",
f"git fetch --depth 1 origin {commit_id}",
f"git reset --hard {commit_id}",
"git clean -fdx",
"git status",
]
return " && ".join(reset_commands)
Expand Down

0 comments on commit e9aafc8

Please sign in to comment.