1. score_top_3_negatives — rewrite to unambiguously "most-negative first" via
explicit `sorted(negatives, key=contribution)[:3]` (ascending sort). Раньше
использовался trick `[-3:][::-1]` на desc-sorted — давал тот же результат
для N>=3 negatives, но неинтуитивно читать.
2. _compute_confidence(recent_deals_count) — guard `int(... or 0)` через
try/except (ValueError, TypeError). Защищает от non-numeric строки в
external/legacy market_trend payload.
3. Style: `import datetime as _dt` перенесён из function-scope в module-level.
Per auto-review on
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| admin_jobs.py | ||
| admin_leads.py | ||
| admin_scrape.py | ||
| analytics.py | ||
| concepts.py | ||
| parcels.py | ||
| photos.py | ||