From 39af474f44689bfcdc806ac621f8f50e3714ee00 Mon Sep 17 00:00:00 2001 From: bot-backend Date: Wed, 16 Sep 2026 19:56:36 +0300 Subject: [PATCH] =?UTF-8?q?style:=20ruff=20format=20=D0=BF=D0=BE=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B3?= =?UTF-8?q?=D0=B5=D0=B9=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tradein-mvp/backend/app/services/estimator.py | 4 +--- tradein-mvp/backend/tests/test_estimator_requires_analogs.py | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tradein-mvp/backend/app/services/estimator.py b/tradein-mvp/backend/app/services/estimator.py index 5f4aff20..e3f96093 100644 --- a/tradein-mvp/backend/app/services/estimator.py +++ b/tradein-mvp/backend/app/services/estimator.py @@ -4196,9 +4196,7 @@ def _price_from_inputs( and dkp_raw is not None and dkp_raw.get("count", 0) >= DEALS_HEADLINE_FALLBACK_MIN_N and dkp_raw.get("median_ppm2", 0) > 0 - and not ( - settings.estimate_require_local_evidence and dkp_raw.get("scope") == "city_wide" - ) + and not (settings.estimate_require_local_evidence and dkp_raw.get("scope") == "city_wide") ): median_ppm2 = float(dkp_raw["median_ppm2"]) median_price = int(median_ppm2 * area_m2) diff --git a/tradein-mvp/backend/tests/test_estimator_requires_analogs.py b/tradein-mvp/backend/tests/test_estimator_requires_analogs.py index 8beca395..61ecb52b 100644 --- a/tradein-mvp/backend/tests/test_estimator_requires_analogs.py +++ b/tradein-mvp/backend/tests/test_estimator_requires_analogs.py @@ -59,7 +59,9 @@ def _run_estimate( async def _run(): 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.dadata_clean_address", new=AsyncMock(return_value=None)), patch("app.services.estimator.match_house_readonly", return_value=None),