执行 Ruff 安全自动修复

This commit is contained in:
yml2213
2026-08-31 10:28:14 +08:00
parent 2a1d27f953
commit b58c6b4357
145 changed files with 940 additions and 993 deletions
+3 -4
View File
@@ -8,7 +8,6 @@ import re
import threading
import time
from abc import ABC, abstractmethod
from typing import Optional
import requests
from loguru import logger
@@ -144,12 +143,12 @@ class BaseWhitelistAdapter(ABC):
return False, msg
@staticmethod
def get_local_exit_ip() -> Optional[str]:
def get_local_exit_ip() -> str | None:
"""获取本机当前公网出口IP(不走代理)。"""
return _get_local_exit_ip()
def _get_local_exit_ip() -> Optional[str]:
def _get_local_exit_ip() -> str | None:
"""获取本机当前公网出口IP(不走代理)。"""
targets = [
"https://myip.ipip.net",
@@ -171,7 +170,7 @@ def _get_local_exit_ip() -> Optional[str]:
return None
def get_exit_ip_via_proxy(proxy: str) -> Optional[str]:
def get_exit_ip_via_proxy(proxy: str) -> str | None:
"""通过代理获取出口IP。"""
targets = [
"https://qifu-api.baidubce.com/ip/local/geo/v1/district",