chore: format

This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-09 15:25:27 +09:00
1 parent 46ff3abbb8
commit 7bcc0e2e5c
30 files changed
+155 -159

No files matched your search

+2 -3
View File
@@ -147,8 +147,7 @@ def transcode_audio_to_mp3(audio_data: bytes, content_type_header: str, output_p
if BYPASS_PYDUB_PREPROCESSING:
log.warning(
f'TTS returned {mime_type} but BYPASS_PYDUB_PREPROCESSING is set; '
f'writing raw audio without transcoding'
f'TTS returned {mime_type} but BYPASS_PYDUB_PREPROCESSING is set; writing raw audio without transcoding'
)
return False
@@ -1190,7 +1189,7 @@ def transcribe(request: Request, file_path: str, metadata: Optional[dict] = None
results = []
try:
if getattr(request.app.state.config, "STT_ENGINE", "") == "":
if getattr(request.app.state.config, 'STT_ENGINE', '') == '':
max_workers = 1
else:
max_workers = None
+5 -1
View File
@@ -374,7 +374,11 @@ async def verify_tool_servers_config(request: Request, form_data: ToolServerConn
try:
if form_data.type == 'mcp':
if form_data.auth_type in ('oauth_2.1', 'oauth_2.1_static'):
oauth_server_url = form_data.info.get('oauth_server_url') if form_data.info and form_data.info.get('oauth_server_url') else form_data.url
oauth_server_url = (
form_data.info.get('oauth_server_url')
if form_data.info and form_data.info.get('oauth_server_url')
else form_data.url
)
discovery_urls = await get_discovery_urls(oauth_server_url)
for discovery_url in discovery_urls:
log.debug(f'Trying to fetch OAuth 2.1 discovery document from {discovery_url}')
+1 -1
View File
@@ -347,7 +347,7 @@ async def update_note_by_id(
note = await Notes.update_note_by_id(id, form_data, db=db)
pinned_note_ids = await Notes.get_pinned_note_ids(user.id, db=db)
note.is_pinned = note.id in pinned_note_ids
await sio.emit(
'note-events',
note.model_dump(),
+1 -3
View File
@@ -517,9 +517,7 @@ async def get_openai_loaded_models(request: Request, models: dict, api_base_urls
key = api_keys[idx] if idx < len(api_keys) else None
slots = await send_get_request(url=f'{root_url}/slots', key=key)
loaded_model_ids = (
{s.get('model') for s in slots if s.get('model')}
if isinstance(slots, list)
else set()
{s.get('model') for s in slots if s.get('model')} if isinstance(slots, list) else set()
)
for model_id, model in models.items():
if model.get('urlIdx') == idx: