Skip to content

Commit

Permalink
Skip empty files in get repo file dependencies (#254)
Browse files Browse the repository at this point in the history
Co-authored-by: Rita Aleksziev <[email protected]>
  • Loading branch information
alekszievr and Rita Aleksziev authored Dec 4, 2024
1 parent df8fc82 commit ac62e98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cognee/tasks/repo_processor/get_repo_file_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ async def get_py_files_dict(repo_path):
py_files_dict = {}
for file_path in py_files_paths:
absolute_path = os.path.abspath(file_path)

if os.path.getsize(absolute_path) == 0:
continue

relative_path, source_code = await get_py_path_and_source(absolute_path)
py_files_dict[relative_path] = {"source_code": source_code}

Expand Down

0 comments on commit ac62e98

Please sign in to comment.