Unify the way the imports work #9

Merged
alexander merged 21 commits from unify-imports into develop 2026-11-30 20:30:54 +01:00
Showing only changes of commit 78e052b668 - Show all commits

Use sa.func instead of importing func

Naming rule for `velofy`: Import modules instead of objects
Alexander Hess 2026-11-30 14:19:20 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -9,7 +9,7 @@ import datetime as dt
import sys
import click
from sqlalchemy import func
import sqlalchemy as sa
from sqlalchemy.orm import exc as orm_exc
from velofy import config
@ -105,7 +105,7 @@ def tactical_heuristic( # noqa:C901,D417,DOC001
# commands are added the make `Forecast`s without the heuristic!
# Continue with forecasting on the day the last prediction was made ...
last_predict_at = (
db.session.query(func.max(db.Forecast.start_at))
db.session.query(sa.func.max(db.Forecast.start_at))
.join(db.Pixel, db.Forecast.pixel_id == db.Pixel.id)
.join(db.Grid, db.Pixel.grid_id == db.Grid.id)
.filter(db.Forecast.pixel == pixel)