From 78a274ce5b2c2f32ac2069d65f0ecc60b0e2f0fc Mon Sep 17 00:00:00 2001 From: gooker_young Date: Fri, 26 Jun 2026 01:22:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0python=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=88=B03.13=E5=92=8Cpyflowx=E5=88=B00.2.0=EF=BC=8C?= =?UTF-8?q?=E7=AE=80=E5=8C=96json=E5=93=8D=E5=BA=94=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整了emlmanager.py里的json响应代码格式,让代码更简洁 --- .python-version | 2 +- src/pyflowx/cli/emlmanager.py | 16 +++++++--------- uv.lock | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.python-version b/.python-version index cc1923a..24ee5b1 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.8 +3.13 diff --git a/src/pyflowx/cli/emlmanager.py b/src/pyflowx/cli/emlmanager.py index e1a2b9a..a4ac192 100644 --- a/src/pyflowx/cli/emlmanager.py +++ b/src/pyflowx/cli/emlmanager.py @@ -557,15 +557,13 @@ class EmlManagerHandler(BaseHTTPRequestHandler): emails = self.db.search_emails(keyword, field, limit, offset) total_count = self.db.get_email_count() - self._send_json_response( - { - "emails": emails, - "count": len(emails), - "total": total_count, - "limit": limit, - "offset": offset, - } - ) + self._send_json_response({ + "emails": emails, + "count": len(emails), + "total": total_count, + "limit": limit, + "offset": offset, + }) def _api_get_email(self, query_params: dict[str, list[str]]) -> None: """API: 获取单个邮件详情.""" diff --git a/uv.lock b/uv.lock index ae18e08..e081304 100644 --- a/uv.lock +++ b/uv.lock @@ -2184,7 +2184,7 @@ wheels = [ [[package]] name = "pyflowx" -version = "0.1.13" +version = "0.2.0" source = { editable = "." } dependencies = [ { name = "graphlib-backport", marker = "python_full_version < '3.9'" },