mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Fix ruff format for user_notifications and spoolman
This commit is contained in:
@@ -36,9 +36,7 @@ async def get_user_email_preferences(
|
||||
notify_print_stopped=True,
|
||||
)
|
||||
|
||||
result = await db.execute(
|
||||
select(UserEmailPreference).where(UserEmailPreference.user_id == current_user.id)
|
||||
)
|
||||
result = await db.execute(select(UserEmailPreference).where(UserEmailPreference.user_id == current_user.id))
|
||||
pref = result.scalar_one_or_none()
|
||||
|
||||
if pref is None:
|
||||
@@ -72,9 +70,7 @@ async def update_user_email_preferences(
|
||||
detail="User must have an email address to receive notifications",
|
||||
)
|
||||
|
||||
result = await db.execute(
|
||||
select(UserEmailPreference).where(UserEmailPreference.user_id == current_user.id)
|
||||
)
|
||||
result = await db.execute(select(UserEmailPreference).where(UserEmailPreference.user_id == current_user.id))
|
||||
pref = result.scalar_one_or_none()
|
||||
|
||||
if pref is None:
|
||||
|
||||
@@ -11,6 +11,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
BAMBU_RFID_TAG_LENGTH = 32
|
||||
|
||||
|
||||
@dataclass
|
||||
class SpoolmanSpool:
|
||||
"""Represents a spool in Spoolman."""
|
||||
|
||||
Reference in New Issue
Block a user