fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解 - 清理未使用的导入 - 统一字符串格式化为f-string - 修复行长度超过120字符的问题
This commit is contained in:
@@ -1406,7 +1406,8 @@ class TenantManager:
|
||||
|
||||
def _validate_domain(self, domain: str) -> bool:
|
||||
"""验证域名格式"""
|
||||
pattern = r"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0, 61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0, 61}[a-zA-Z0-9])$"
|
||||
pattern = (r"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0, 61}[a-zA-Z0-9])?\.)*"
|
||||
r"[a-zA-Z0-9](?:[a-zA-Z0-9-]{0, 61}[a-zA-Z0-9])$")
|
||||
return bool(re.match(pattern, domain))
|
||||
|
||||
def _check_domain_verification(self, domain: str, token: str, method: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user