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
commit a1104ab97e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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",