fix(lint): 修复 PR #14 引入的 lint 回退 (119→0)
PR #14 从旧分支复制文件导致回退了 PR #10 的 lint 修复。 修复内容: - autoflake 移除未使用导入/变量 - autopep8 修复缩进/空格 - 手动修复 F821(pathlib→Path), F541(f-string), F841(未使用变量) - 所有修复均通过 flake8 --max-line-length=120 --extend-ignore=E501 检查 (0 errors)
This commit is contained in:
+14
-6
@@ -10,7 +10,7 @@ from typing import List, Optional
|
||||
|
||||
from src.blackboard.operations import Blackboard
|
||||
from src.utils import get_data_root
|
||||
from src.blackboard.models import Task, Comment, Output, Decision, Observation, Review, Experience
|
||||
from src.blackboard.models import Task, Review
|
||||
from src.blackboard.queries import Queries
|
||||
from src.blackboard.registry import ProjectRegistry
|
||||
|
||||
@@ -35,7 +35,9 @@ def _get_queries(project_id: str) -> Queries:
|
||||
|
||||
|
||||
def build_blackboard_parser() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(prog="blackboard", description="Agent blackboard operations")
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="blackboard",
|
||||
description="Agent blackboard operations")
|
||||
sub = parser.add_subparsers(dest="command")
|
||||
|
||||
# read
|
||||
@@ -206,7 +208,11 @@ def _cmd_comment(opts) -> int:
|
||||
|
||||
def _cmd_decide(opts) -> int:
|
||||
bb = _get_bb(opts.project)
|
||||
did = bb.add_decision(opts.task_id, opts.decider, opts.decision, opts.rationale)
|
||||
did = bb.add_decision(
|
||||
opts.task_id,
|
||||
opts.decider,
|
||||
opts.decision,
|
||||
opts.rationale)
|
||||
print(f"Decision recorded: {did}")
|
||||
return 0
|
||||
|
||||
@@ -251,7 +257,8 @@ def _print_tasks(tasks, as_json: bool):
|
||||
|
||||
|
||||
def build_admin_parser() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(prog="admin", description="Admin operations")
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="admin", description="Admin operations")
|
||||
sub = parser.add_subparsers(dest="command")
|
||||
|
||||
# project create
|
||||
@@ -262,7 +269,7 @@ def build_admin_parser() -> argparse.ArgumentParser:
|
||||
p_pc.add_argument("--description", default="")
|
||||
|
||||
# project list
|
||||
p_pl = sub.add_parser("project-list", help="List projects")
|
||||
sub.add_parser("project-list", help="List projects")
|
||||
|
||||
# project archive
|
||||
p_pa = sub.add_parser("project-archive", help="Archive project")
|
||||
@@ -300,7 +307,8 @@ def run_admin_cli(args: Optional[List[str]] = None) -> int:
|
||||
for pid, info in projects.items():
|
||||
status = info.get("status", "?")
|
||||
agents = ",".join(info.get("agents", []))
|
||||
print(f" {pid} [{status}] {info.get('name', '')} agents: {agents}")
|
||||
print(
|
||||
f" {pid} [{status}] {info.get('name', '')} agents: {agents}")
|
||||
return 0
|
||||
|
||||
elif opts.command == "project-archive":
|
||||
|
||||
Reference in New Issue
Block a user