完成 Ruff 全量清理
This commit is contained in:
@@ -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", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user