Skip to content

Commit

Permalink
Don't raise exception when there's an error parsing (#23)
Browse files Browse the repository at this point in the history
* Don't raise exception when there's an error parsing

* Add bump2version dev dependency

* Bump version
  • Loading branch information
shruti222patel authored Aug 22, 2023
1 parent a3ed389 commit 1b50287
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
13 changes: 12 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "repo-gpt"
version = "0.1.3"
version = "0.1.4"
description = "Search your code repository using GPT3.5 or GPT4."
authors = ["Shruti Patel <[email protected]>"]
license = "Apache License 2.0"
Expand Down Expand Up @@ -40,6 +40,7 @@ pytest = "^7.3.2"
pre-commit = "^3.3.2"
exceptiongroup = { version="^1.1.1", markers="python_version <= '3.10'" }
jupyterlab = "^4.0.4"
bump2version = "^1.0.1"

[tool.poetry.scripts]
repo-gpt = "repo_gpt.cli:main"
Expand Down
7 changes: 2 additions & 5 deletions src/repo_gpt/code_manager/code_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ def extract_code_files(self) -> List[str]:
]

for file in files:
try:
file_path = root_path / file
code_files.append(self.code_root_path / file_path)
except Exception as e:
print(f"Error processing file {file}: {e}")
file_path = root_path / file
code_files.append(self.code_root_path / file_path)
return code_files

def get_gitignore(self) -> List[str]:
Expand Down
1 change: 0 additions & 1 deletion src/repo_gpt/file_handler/generic_code_file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def extract_code(self, filepath: Path) -> List[ParsedCode]:
return self.parse_tree(tree)
except Exception as e:
print(f"Failed to parse file {filepath}: {e}")
raise

def parse_tree(self, tree) -> List[ParsedCode]:
parsed_nodes = []
Expand Down

0 comments on commit 1b50287

Please sign in to comment.