mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
style: make chained comparison of status_code clearer
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
2e4066be4d
commit
2c24bd6366
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ class ProbeResult:
|
|||
def healthy(self) -> bool:
|
||||
# Route exists (not 404), handler did not crash (not 5xx), request
|
||||
# completed (not -1). A 4xx (missing params/auth) still means it ran.
|
||||
return 200 <= self.status_code != 404 and self.status_code < 500
|
||||
return 200 <= self.status_code < 500 and self.status_code != 404
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"GET {self.url} -> {self.status_code}\n{self.body[:600]}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue