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:
apex-mochen 2026-10-10 14:07:48 +00:00
parent 9937e2cc13
commit 10fba55595

View file

@ -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(