mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
chore: linting
This commit is contained in:
parent
4dda02c06c
commit
94e834134f
80 changed files with 443 additions and 404 deletions
|
|
@ -33,7 +33,6 @@ import pytest
|
|||
|
||||
from app.agents.new_chat.context import SurfSenseContextSchema
|
||||
from app.services.new_streaming_service import VercelStreamingService
|
||||
|
||||
from app.tasks.chat.stream_new_chat import (
|
||||
stream_new_chat as old_stream_new_chat,
|
||||
stream_resume_chat as old_stream_resume_chat,
|
||||
|
|
@ -152,7 +151,13 @@ class _FakeSurfsenseDoc:
|
|||
"user_query, image_urls, docs, expected_title, expected_action",
|
||||
[
|
||||
("hello world", None, [], "Understanding your request", "Processing"),
|
||||
("", ["data:image/png;base64,AAA"], [], "Understanding your request", "Processing"),
|
||||
(
|
||||
"",
|
||||
["data:image/png;base64,AAA"],
|
||||
[],
|
||||
"Understanding your request",
|
||||
"Processing",
|
||||
),
|
||||
("", None, [], "Understanding your request", "Processing"),
|
||||
(
|
||||
"doc question",
|
||||
|
|
@ -209,9 +214,10 @@ def test_initial_thinking_step_collapses_many_doc_names() -> None:
|
|||
|
||||
|
||||
def test_image_capability_passes_without_images() -> None:
|
||||
assert check_image_input_capability(
|
||||
user_image_data_urls=None, agent_config=None
|
||||
) is None
|
||||
assert (
|
||||
check_image_input_capability(user_image_data_urls=None, agent_config=None)
|
||||
is None
|
||||
)
|
||||
|
||||
|
||||
def test_image_capability_passes_when_capability_unknown() -> None:
|
||||
|
|
@ -500,9 +506,7 @@ def test_can_recover_provider_rate_limit_rejects_non_rate_limit_exception() -> N
|
|||
def test_spawn_set_ai_responding_bg_noop_without_user_id() -> None:
|
||||
async def _run() -> set[asyncio.Task]:
|
||||
background: set[asyncio.Task] = set()
|
||||
spawn_set_ai_responding_bg(
|
||||
chat_id=1, user_id=None, background_tasks=background
|
||||
)
|
||||
spawn_set_ai_responding_bg(chat_id=1, user_id=None, background_tasks=background)
|
||||
return background
|
||||
|
||||
bg = asyncio.run(_run())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue