mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-14 04:09:09 +00:00
fix(proxy): collapse the double endswith into one tuple call
The strict-rule gate (ruff PIE810) flags two consecutive `endswith` calls on the same string; merge them into a single `endswith((method, ":" + method))`. Behavior is unchanged (verified: the 7 route-matching cases from the previous commit still pass). Signed-off-by: apex-mochen <2756823972@qq.com>
This commit is contained in:
parent
9937e2cc13
commit
10fba55595
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ class VertexPassthroughLoggingHandler:
|
|||
``.../gemini-3.8-flash:streamGenerateContent?alt=sse`` still matches.
|
||||
"""
|
||||
path = urlparse(url_route).path
|
||||
return path.endswith(method) or path.endswith(":" + method)
|
||||
return path.endswith((method, ":" + method))
|
||||
|
||||
@staticmethod
|
||||
def vertex_passthrough_handler(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue