Skip to content

Commit

Permalink
Fix parsed code bug & version bump (#22)
Browse files Browse the repository at this point in the history
* Fix

* Bump version
  • Loading branch information
shruti222patel authored Aug 22, 2023
1 parent d786231 commit a3ed389
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Binary file modified .repo_gpt/code_embeddings.pkl
Binary file not shown.
2 changes: 1 addition & 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.2"
version = "0.1.3"
description = "Search your code repository using GPT3.5 or GPT4."
authors = ["Shruti Patel <[email protected]>"]
license = "Apache License 2.0"
Expand Down
8 changes: 5 additions & 3 deletions src/repo_gpt/code_manager/code_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ def extract_functions_from_file(
self, filepath: str, file_checksum: str
) -> List[ParsedCode]:
handler = self.get_handler(filepath)
code_blocks = []
if handler:
parsed_code = handler().extract_code(filepath)
for code in parsed_code:
code_blocks = handler().extract_code(filepath)
for code in code_blocks:
code.filepath = filepath
code.file_checksum = file_checksum
return parsed_code

return code_blocks

0 comments on commit a3ed389

Please sign in to comment.