fix(services): make RagService protocol sync + fix no-op isinstance assertion
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user