fix(lint): resolve all 37 flake8 issues (#33)
Deploy / ci (push) Successful in 10s
Deploy / deploy (push) Successful in 11s
Deploy / notify-deploy-failure (push) Successful in 1s

This commit was merged in pull request #33.
This commit is contained in:
2026-06-11 02:34:50 +00:00
parent 4bf3d97a04
commit 1089991455
7 changed files with 33 additions and 34 deletions
+3 -3
View File
@@ -7,7 +7,6 @@ from __future__ import annotations
import json
import logging
from pathlib import Path
from typing import Dict, Optional
from src.daemon.base_task_handler import BaseTaskHandler, VerifyResult
from src.daemon.prompt_composer import PromptComposer, PromptContext
@@ -15,6 +14,7 @@ from src.blackboard.db import get_connection
logger = logging.getLogger("moziplus-v2.handler.mail")
class MailHandler(BaseTaskHandler):
"""Mail 任务 handler。"""
@@ -65,7 +65,7 @@ class MailHandler(BaseTaskHandler):
"""request 验证失败 → 标 failed + 通知发件人"""
self._mark_task_status(db_path, task_id, "failed")
logger.info("Mail %s: request verify failed (%s), marked failed",
task_id, verify.reason)
task_id, verify.reason)
# 通知发件人
try:
@@ -95,7 +95,7 @@ class MailHandler(BaseTaskHandler):
def _check_reply(self, task_id: str, db_path: Path) -> bool:
"""检查是否已回复(查 tasks 表找 in_reply_to 回复邮件)
从 dispatcher._mail_check_reply 迁移。
Mail 回复机制:创建新 taskmust_haves JSON 中包含 in_reply_to = original_task_id。
不能查 comments 表——回复邮件是独立的 task,不是 comment。