From 893d437edba044cf4ce56bfe3a70a358ca93a7eb Mon Sep 17 00:00:00 2001 From: yuan-jia06 <151764660@qq.com> Date: Fri, 2 Oct 2026 17:39:33 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=AF=E5=8F=98?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=9D=E8=AF=81=E4=BB=A3=E7=A0=81=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/git_commit_stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git_commit_stats.py b/src/git_commit_stats.py index 6bdbb46..762febc 100644 --- a/src/git_commit_stats.py +++ b/src/git_commit_stats.py @@ -21,7 +21,8 @@ def load_ignore_users(file_path): import subprocess from collections import Counter -def get_commits(since=None, until=None, ignore_list=[]): +def get_commits(since=None, until=None, ignore_list=None): + ignore_list = ignore_list or [] # 使用 %ae(邮箱)作为唯一键,%an(用户名)作为显示名 cmd = ["git", "log", "--pretty=%ae|%an"] From 1b1d6a977ebb7c0a0601160d258be5e6804a48f7 Mon Sep 17 00:00:00 2001 From: yuan-jia06 <151764660@qq.com> Date: Fri, 2 Oct 2026 17:50:23 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BB=99git=20log=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=88=86=E6=94=AF=E5=8A=A0=E4=B8=8A=E4=BA=86=E7=9C=9F=E5=AE=9E?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E8=BE=93=E5=87=BA=E5=B9=B6?= =?UTF-8?q?=E4=BB=A5=E9=80=80=E5=87=BA=E7=A0=81=201=20=E7=BB=88=E6=AD=A2?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=EF=BC=8C=E9=81=BF=E5=85=8D=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=B6=E8=AF=AF=E6=8A=A5"=E7=BB=9F=E8=AE=A1=E5=AE=8C?= =?UTF-8?q?=E6=88=90"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/git_commit_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git_commit_stats.py b/src/git_commit_stats.py index 762febc..bcc0d1b 100644 --- a/src/git_commit_stats.py +++ b/src/git_commit_stats.py @@ -32,8 +32,8 @@ def get_commits(since=None, until=None, ignore_list=None): result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, encoding='utf-8') if result.returncode != 0: - print("git log 执行失败") - return [], {} + print("git log 执行失败{result.stderr.strip()}") + sys.exit(1) raw_data = result.stdout.strip().split("\n") email_to_name = {} From 4df65982e42130db3d6fbf452575235a1b134c71 Mon Sep 17 00:00:00 2001 From: yuan-jia06 <151764660@qq.com> Date: Sat, 3 Oct 2026 13:24:30 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=BA--save=E5=8F=82=E6=95=B0=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E4=BA=86=E4=BD=BF=E7=94=A8=E8=AF=B4=E6=98=8E=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/src/python/figure_example.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/python/figure_example.py b/docs/src/python/figure_example.py index be3061c..a5dc60c 100644 --- a/docs/src/python/figure_example.py +++ b/docs/src/python/figure_example.py @@ -26,6 +26,8 @@ def main(args): if args.save: pu.save_fig(fig, args.save) + save_path = args.save if '.' in args.save else args.save + '.pdf' + pu.save_fig(fig, save_path) else: plt.show() From 4a8050ff9d427d9b24bc676e5278a1f0cd9c07c5 Mon Sep 17 00:00:00 2001 From: yuan-jia06 <151764660@qq.com> Date: Sun, 4 Oct 2026 07:31:11 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E8=BE=85=E5=8A=A9=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/src/python/figure_example.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/src/python/figure_example.py b/docs/src/python/figure_example.py index a5dc60c..ffd49b5 100644 --- a/docs/src/python/figure_example.py +++ b/docs/src/python/figure_example.py @@ -25,7 +25,6 @@ def main(args): plt.tight_layout() if args.save: - pu.save_fig(fig, args.save) save_path = args.save if '.' in args.save else args.save + '.pdf' pu.save_fig(fig, save_path) else: