mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
consistent use of Tuple
This commit is contained in:
parent
61d9e64e1b
commit
561594a6ca
1 changed files with 2 additions and 5 deletions
|
|
@ -1,12 +1,9 @@
|
|||
from collections import defaultdict
|
||||
from typing import List, cast
|
||||
|
||||
from sqlalchemy import Tuple
|
||||
from typing import List, Tuple, cast
|
||||
|
||||
from backend.app.db.functions.recommendations_functions import (
|
||||
get_plans_by_portfolio_id,
|
||||
get_scenario,
|
||||
set_plan_default,
|
||||
update_plan,
|
||||
)
|
||||
from backend.app.db.models.recommendations import PlanModel, ScenarioModel
|
||||
|
|
@ -65,7 +62,7 @@ def _update_default_flags(plans: List[Plan], cheapest_plan: Plan) -> None:
|
|||
plan.set_default(plan.id == cheapest_plan.id)
|
||||
|
||||
plan_model, scenario_model = cast(
|
||||
tuple[PlanModel, ScenarioModel],
|
||||
Tuple[PlanModel, ScenarioModel],
|
||||
plan.to_sqlalchemy(),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue