完成 Ruff 全量清理

This commit is contained in:
yml2213
2026-08-31 10:55:44 +08:00
parent 840af3108e
commit 09ab80e062
68 changed files with 323 additions and 291 deletions
+3 -3
View File
@@ -189,7 +189,7 @@ class ProxyService:
push("error", "未配置代理地址或API")
push("result", "")
except Exception as e:
except Exception as e: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
push("error", f"测试异常: {e}")
push("result", "")
@@ -254,7 +254,7 @@ class ProxyService:
if whitelist_ip:
local_ip = whitelist_ip
push("info", f"从代理API获取到本机IP: {local_ip}")
except Exception as e:
except Exception as e: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
push("warning", f"代理API请求失败: {e}")
if not local_ip:
@@ -293,7 +293,7 @@ class ProxyService:
push("success" if sync_ok else "error", f"白名单同步: {sync_msg}")
push("result", "")
except Exception as e:
except Exception as e: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
push("error", f"测试异常: {e}")
push("result", "")