Skip to content

Commit 9452162

Browse files
author
Jet Xu
committed
remove ast logic
1 parent e242564 commit 9452162

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

llama_github/data_retrieval/github_entities.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,10 @@ def get_pr_content(self, number, pr=None, context_lines=10, force_update=False)
669669
custom_diff = ''
670670

671671
# Categorize code changes
672-
change_categories = CodeAnalyzer.categorize_change(custom_diff)
672+
# change_categories = CodeAnalyzer.categorize_change(custom_diff)
673673

674674
# Extract imports from head content
675-
related_modules = CodeAnalyzer.extract_imports(head_content) if language == 'Python' and head_content else []
675+
# related_modules = CodeAnalyzer.extract_imports(head_content) if language == 'Python' and head_content else []
676676

677677
# Build file change entry
678678
file_change = {
@@ -682,9 +682,9 @@ def get_pr_content(self, number, pr=None, context_lines=10, force_update=False)
682682
"language": language,
683683
"additions": additions,
684684
"deletions": deletions,
685-
"changes": changes,
686-
"change_categories": change_categories,
687-
"related_modules": related_modules
685+
"changes": changes #,
686+
# "change_categories": change_categories,
687+
# "related_modules": related_modules
688688
}
689689

690690
# Check for dependency changes

llama_github/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_ast_representation(code_str: str) -> Optional[str]:
163163
try:
164164
tree = ast.parse(code_str)
165165
return ast.dump(tree)
166-
except SyntaxError:
166+
except Exception:
167167
logger.error("Syntax error in the provided code")
168168
return None
169169

@@ -188,7 +188,7 @@ def extract_imports(code_str: str) -> Dict[str, Any]:
188188

189189
try:
190190
tree = ast.parse(code_str)
191-
except SyntaxError as e:
191+
except Exception as e:
192192
logger.error(f"Syntax error in the provided code: {e}")
193193
import_info["errors"].append(str(e))
194194
return import_info

llama_github/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.2.4'
1+
__version__ = '0.2.5'

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = llama-github
3-
version = 0.2.4
3+
version = 0.2.5
44
author = Jet Xu
55
author_email = Voldemort.xu@foxmail.com
66
description = Llama-github is an open-source Python library that empowers LLM Chatbots, AI Agents, and Auto-dev Agents to conduct Retrieval from actively selected GitHub public projects. It Augments through LLMs and Generates context for any coding question, in order to streamline the development of sophisticated AI-driven applications.

0 commit comments

Comments
 (0)