style: ruff format после правки гейта
All checks were successful
CI Trade-In / changes (pull_request) Successful in 11s
CI / changes (pull_request) Successful in 13s
CI Trade-In / browser-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Successful in 5m10s

This commit is contained in:
bot-backend 2026-09-16 19:56:36 +03:00
parent 182f1d2802
commit 39af474f44
2 changed files with 4 additions and 4 deletions

View file

@ -4196,9 +4196,7 @@ def _price_from_inputs(
and dkp_raw is not None and dkp_raw is not None
and dkp_raw.get("count", 0) >= DEALS_HEADLINE_FALLBACK_MIN_N and dkp_raw.get("count", 0) >= DEALS_HEADLINE_FALLBACK_MIN_N
and dkp_raw.get("median_ppm2", 0) > 0 and dkp_raw.get("median_ppm2", 0) > 0
and not ( and not (settings.estimate_require_local_evidence and dkp_raw.get("scope") == "city_wide")
settings.estimate_require_local_evidence and dkp_raw.get("scope") == "city_wide"
)
): ):
median_ppm2 = float(dkp_raw["median_ppm2"]) median_ppm2 = float(dkp_raw["median_ppm2"])
median_price = int(median_ppm2 * area_m2) median_price = int(median_ppm2 * area_m2)

View file

@ -59,7 +59,9 @@ def _run_estimate(
async def _run(): async def _run():
with ( with (
patch("app.services.estimator.settings.estimate_require_local_evidence", require_analogs), patch(
"app.services.estimator.settings.estimate_require_local_evidence", require_analogs
),
patch("app.services.estimator.geocode", new=AsyncMock(return_value=_make_fake_geo())), patch("app.services.estimator.geocode", new=AsyncMock(return_value=_make_fake_geo())),
patch("app.services.estimator.dadata_clean_address", new=AsyncMock(return_value=None)), patch("app.services.estimator.dadata_clean_address", new=AsyncMock(return_value=None)),
patch("app.services.estimator.match_house_readonly", return_value=None), patch("app.services.estimator.match_house_readonly", return_value=None),