chore: refurish python code by applying Pylint linter rules (#8322)
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user