chore(types): 7 個核心檔補 type hints#10
Merged
Merged
Conversation
config/ingest/embed/enrich/score/search/serve 全部函式簽名補上參數+回傳 型別,加 from __future__ import annotations,精準型別優先於 Any (sqlite3.Connection / Path / list[dict] 等)。純標注、零行為改變。 驗證: ruff clean + pytest 64 passed(不變)。 非嚴格 mypy 抽驗浮現 8 個既有 | None 流問題(serve.py global-None 模式 5 個 + enrich.py 回傳/索引可能 None 3 個)— 這些是 hints 揭露的既有 type 鬆散, 非本次引入;列 follow-up(mypy 全綠是獨立一筆債)。 Constraint: 純加法 annotations,不改 logic/control flow,不重構 Directive: 先補 hints 讓型別可見;mypy strict-clean 另開 task(會改 None 守衛=行為) Rejected: Grok Build 原派此任務 | headless 兩次 exit=1(mem0:8791 MCP 噪音燒 turn + 找不存在的 pyproject + max_turns 爆),circuit breaker 換 Codex Not-tested: mypy strict(刻意,本次只補 hints) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
config/ingest/embed/enrich/score/search/serve 全部函式簽名補上參數+回傳型別,加
from __future__ import annotations。純標注、零行為改變。| None流問題(serve.py global-None 模式 5 + enrich.py 回傳/索引可能 None 3)— hints 揭露的既有 type 鬆散,非本次引入,列 follow-up🤖 Generated with Claude Code