fix(services): make RagService protocol sync + fix no-op isinstance assertion

This commit is contained in:
lhl
2026-08-13 09:27:16 +08:00
parent ce64f2536f
commit 8db9cbfdf7
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ from typing import Protocol, runtime_checkable
@runtime_checkable
class RagService(Protocol):
async def retrieve_write_rules(self, chapter_id: str) -> list[str]: ...
async def retrieve_design_rules(self, chapter_id: str) -> list[str]: ...
def retrieve_write_rules(self, chapter_id: str) -> list[str]: ...
def retrieve_design_rules(self, chapter_id: str) -> list[str]: ...
class CannedRagService:
+1 -1
View File
@@ -11,4 +11,4 @@ def test_canned_rag_returns_rules():
def test_rag_service_is_protocol():
assert isinstance(CannedRagService("samples"), RagService) or True
assert isinstance(CannedRagService("samples"), RagService)