From 3527a6bc8dd6fde13675fe8792c326a8d9c385b1 Mon Sep 17 00:00:00 2001 From: bot-backend Date: Sun, 31 May 2026 18:50:35 +0300 Subject: [PATCH] style(browser): fix pre-existing ruff lints in server.py (RUF100, E501) Drive-by: browser/server.py was never linted (pre-commit ruff is scoped to backend/), so #909 left an unused noqa + a 101-char line. Cleaned up while editing this file for the proxy fix. --- tradein-mvp/browser/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tradein-mvp/browser/server.py b/tradein-mvp/browser/server.py index 2b62d186..d071a0ba 100644 --- a/tradein-mvp/browser/server.py +++ b/tradein-mvp/browser/server.py @@ -87,7 +87,7 @@ async def _launch_browser() -> None: """Запускает AsyncCamoufox и сохраняет browser + CM в модульных переменных.""" global _browser, _browser_cm, _page_counter - from camoufox.async_api import AsyncCamoufox # noqa: PLC0415 + from camoufox.async_api import AsyncCamoufox proxy = _parse_proxy(SCRAPER_PROXY_URL) kwargs: dict[str, object] = { @@ -180,7 +180,9 @@ async def fetch_handler(request: web.Request) -> web.Response: try: html = await _do_fetch(url) except Exception as exc: - logger.error("tradein-browser: fetch error url=%r: %s: %s", url, type(exc).__name__, exc) + logger.error( + "tradein-browser: fetch error url=%r: %s: %s", url, type(exc).__name__, exc + ) return web.json_response({"error": f"{type(exc).__name__}: {exc}"}, status=500) return web.json_response({"html": html})