DRY + stability pass — extension, ML/settings backend, frontend cards (#161) #232

Merged
bvandeusen merged 7 commits from dev into main 2026-07-13 23:08:18 -04:00
Showing only changes of commit 05df51b749 - Show all commits
+2 -2
View File
@@ -215,12 +215,12 @@ class MLSettings(Base):
) )
@classmethod @classmethod
async def load(cls, session) -> "MLSettings": async def load(cls, session) -> MLSettings:
"""The singleton settings row (id=1), via an async session. Mirrors """The singleton settings row (id=1), via an async session. Mirrors
ImportSettings.load — the shared singleton-loader pattern.""" ImportSettings.load — the shared singleton-loader pattern."""
return (await session.execute(select(cls).where(cls.id == 1))).scalar_one() return (await session.execute(select(cls).where(cls.id == 1))).scalar_one()
@classmethod @classmethod
def load_sync(cls, session) -> "MLSettings": def load_sync(cls, session) -> MLSettings:
"""The singleton settings row (id=1), via a sync session.""" """The singleton settings row (id=1), via a sync session."""
return session.execute(select(cls).where(cls.id == 1)).scalar_one() return session.execute(select(cls).where(cls.id == 1)).scalar_one()