chore: refurish python code by applying Pylint linter rules (#8322)

This commit is contained in:
Bowen Liang
2024-09-13 22:42:08 +08:00
committed by GitHub
parent 1ab81b4972
commit a1104ab97e
126 changed files with 253 additions and 272 deletions

View File

@@ -42,7 +42,7 @@ class MockXinferenceClass:
model_uid = url.split("/")[-1] or ""
if not re.match(
r"[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", model_uid
) and model_uid not in ["generate", "chat", "embedding", "rerank"]:
) and model_uid not in {"generate", "chat", "embedding", "rerank"}:
response.status_code = 404
response._content = b"{}"
return response
@@ -53,7 +53,7 @@ class MockXinferenceClass:
response._content = b"{}"
return response
if model_uid in ["generate", "chat"]:
if model_uid in {"generate", "chat"}:
response.status_code = 200
response._content = b"""{
"model_type": "LLM",