mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 22:32:39 +02:00
chore: linting
This commit is contained in:
parent
489dd0aa52
commit
4e174f17f2
8 changed files with 15 additions and 16 deletions
|
|
@ -29,7 +29,6 @@ class RateLimitError(Exception):
|
|||
|
||||
|
||||
class _AlwaysFailingChatModel(BaseChatModel):
|
||||
|
||||
@property
|
||||
def _llm_type(self) -> str:
|
||||
return "always-failing-test-model"
|
||||
|
|
|
|||
|
|
@ -67,9 +67,7 @@ class _RecordingChatModel(BaseChatModel):
|
|||
) -> ChatResult:
|
||||
self.call_count += 1
|
||||
return ChatResult(
|
||||
generations=[
|
||||
ChatGeneration(message=AIMessage(content=self.response_text))
|
||||
]
|
||||
generations=[ChatGeneration(message=AIMessage(content=self.response_text))]
|
||||
)
|
||||
|
||||
async def _agenerate(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ def test_extract_text_content_ignores_thinking_blocks_and_keeps_markdown_text()
|
|||
assert extract_text_content(content).strip() == markdown.strip()
|
||||
|
||||
|
||||
def test_extract_text_content_returns_empty_when_only_thinking_blocks_are_present() -> None:
|
||||
def test_extract_text_content_returns_empty_when_only_thinking_blocks_are_present() -> (
|
||||
None
|
||||
):
|
||||
content = [
|
||||
{"type": "thinking", "thinking": "No durable fact."},
|
||||
{"type": "thinking", "thinking": "Return no update."},
|
||||
|
|
|
|||
|
|
@ -141,9 +141,7 @@ class TestNormalizeDecision:
|
|||
assert _normalize_permission_decision(decision) == {"decision_type": "reject"}
|
||||
|
||||
def test_lc_envelope_reject_with_message_carries_feedback(self) -> None:
|
||||
decision = {
|
||||
"decisions": [{"type": "reject", "message": "wrong recipient"}]
|
||||
}
|
||||
decision = {"decisions": [{"type": "reject", "message": "wrong recipient"}]}
|
||||
out = _normalize_permission_decision(decision)
|
||||
assert out == {"decision_type": "reject", "feedback": "wrong recipient"}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue