fix: S1-S4 建议项修复 — 类型标注精确化+BaseTaskHandler标注后续PR+token预算说明
CI / lint (pull_request) Failing after 8s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 2s

This commit is contained in:
cfdaily
2026-06-10 16:38:00 +08:00
parent 42a28585b8
commit cc974bf258
2 changed files with 6 additions and 4 deletions
+3 -3
View File
@@ -81,14 +81,14 @@ class PromptComposer:
CHARS_PER_TOKEN = 3.5 # 估算比率
def __init__(self) -> None:
self._sections: List[Any] = [] # List[PromptSection]
self._sections: List[PromptSection] = []
def add(self, section: Any) -> None:
def add(self, section: PromptSection) -> None:
"""添加一个 section(同名覆盖)"""
self._sections = [s for s in self._sections if s.name != section.name]
self._sections.append(section)
def add_many(self, sections: List[Any]) -> None:
def add_many(self, sections: List[PromptSection]) -> None:
"""批量添加"""
for s in sections:
self.add(s)