From 2f3db13d507b90b0ca6c891deab6783239dd244f Mon Sep 17 00:00:00 2001 From: Sivan Grunberg Date: Tue, 26 Dec 2023 20:37:02 +0200 Subject: [PATCH] better json handling --- agit/rag.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agit/rag.py b/agit/rag.py index 2b346f6..b168f87 100644 --- a/agit/rag.py +++ b/agit/rag.py @@ -54,10 +54,11 @@ def retrieve_git_data(start_path): "recent_commits": get_commit_history(repo), "conflicts": get_conflict_info(repo) } - return json.dumps(data, indent=4) + + return data if __name__ == "__main__": r_path = '.' # Set the path to your git repository git_data = retrieve_git_data(r_path) - print(git_data) + print(json.dumps(git_data, indent=4))