some automated reformatting

This commit is contained in:
Christoph Stahl 2025-02-15 11:28:16 +01:00
parent 421392e1a8
commit 2ae5c7ac06
3 changed files with 9 additions and 7 deletions

View file

@ -24,9 +24,7 @@ from json.decoder import JSONDecodeError
from argparse import Namespace
from dataclasses import dataclass
from dataclasses import field
from typing import Any, Callable
from typing import AsyncGenerator
from typing import Optional
from typing import Any, Callable, Literal, AsyncGenerator, Optional
import socketio
from aiohttp import web
@ -325,7 +323,9 @@ class Server:
if entry is None:
await self.sio.emit(
"msg",
{"msg": f"Unable to add to the waiting room: {data['ident']}. Maybe try again?"},
{
"msg": f"Unable to add to the waiting room: {data['ident']}. Maybe try again?"
},
room=sid,
)
return None
@ -337,7 +337,6 @@ class Server:
)
return None
if "uid" not in data or (
(data["uid"] is not None and len(list(state.queue.find_by_uid(data["uid"]))) == 0)
or (data["uid"] is None and state.queue.find_by_name(data["performer"]) is None)
@ -636,7 +635,9 @@ class Server:
source = entry.source
source_obj = state.client.sources[source]
if not source_obj.is_valid(entry):
await self.log_to_playback(state, f"Entry {entry.ident} is not valid.", level="error")
await self.log_to_playback(
state, f"Entry {entry.ident} is not valid.", level="error"
)
await state.queue.remove(entry)
else:
for entry in state.waiting_room:

View file

@ -27,6 +27,7 @@ from ..entry import Entry
from ..result import Result
from ..config import BoolOption, ConfigOption
class EntryNotValid(Exception):
"""Raised when an entry is not valid for a source."""