Fixing ruff and mypy issues (#20)
Reviewed-on: #20 Co-authored-by: Andrew Kettel <andrew.kettel@gmail.com> Co-committed-by: Andrew Kettel <andrew.kettel@gmail.com>
This commit was merged in pull request #20.
This commit is contained in:
+7
-9
@@ -66,13 +66,11 @@ class CameraEvent(Base):
|
||||
@staticmethod
|
||||
def recent(limit: int = 50) -> list[CameraEvent]:
|
||||
return list(
|
||||
|
||||
db.session.execute(
|
||||
db.select(CameraEvent)
|
||||
.order_by(CameraEvent.timestamp.desc())
|
||||
.limit(limit)
|
||||
)
|
||||
.scalars()
|
||||
.all()
|
||||
|
||||
db.session.execute(
|
||||
db.select(CameraEvent)
|
||||
.order_by(CameraEvent.timestamp.desc())
|
||||
.limit(limit)
|
||||
)
|
||||
.scalars()
|
||||
.all()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user