From 08a63f611df5c630d97fdcf038cb708a594831d7 Mon Sep 17 00:00:00 2001 From: lekss361 Date: Sun, 26 Apr 2026 11:02:22 +0300 Subject: [PATCH] =?UTF-8?q?backend:=20fix=20mypy=20errors=20in=20geometry?= =?UTF-8?q?=20stub=20-=20empty=5Fbuildings:=20dict=20=E2=86=92=20dict[str,?= =?UTF-8?q?=20Any]=20(mypy=20strict=20needs=20type=20args)=20-=20drop=20un?= =?UTF-8?q?used=20`#=20type:=20ignore[arg-type]`=20on=20strategy=3D=20(myp?= =?UTF-8?q?y=20now=20narrows=20=20=20the=20loop=20variable=20to=20Literal[?= =?UTF-8?q?...]=20from=20a=20tuple=20of=20literals)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/generative/geometry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/app/services/generative/geometry.py b/backend/app/services/generative/geometry.py index 26fa92ad..f53b027a 100644 --- a/backend/app/services/generative/geometry.py +++ b/backend/app/services/generative/geometry.py @@ -5,12 +5,14 @@ Stage 1b: greedy filling of rectangular MKD with 3 strategies. STRtree for colli Performance target: <=10s per variant; fallback acceptance 15s. """ +from typing import Any + from app.schemas.concept import TEAP, ConceptInput, ConceptVariant, FinancialModel def generate_stub(payload: ConceptInput) -> list[ConceptVariant]: """Placeholder returning 3 empty variants. Replaced in Stage 1b.""" - empty_buildings: dict = {"type": "FeatureCollection", "features": []} + empty_buildings: dict[str, Any] = {"type": "FeatureCollection", "features": []} empty_teap = TEAP( built_area_sqm=0.0, total_floor_area_sqm=0.0, @@ -26,7 +28,7 @@ def generate_stub(payload: ConceptInput) -> list[ConceptVariant]: for strategy in ("max_area", "max_insolation", "balanced"): strategies.append( ConceptVariant( - strategy=strategy, # type: ignore[arg-type] + strategy=strategy, buildings_geojson=empty_buildings, teap=empty_teap, financial=empty_financial,