fix(proxy): give the guard import noqa a reason for the type-discipline gate

This commit is contained in:
Renn F 2026-10-11 03:24:40 +02:00
parent 07ab7a7416
commit 95e6ecedc1
No known key found for this signature in database
GPG key ID: B48363D3A3A4CF78

View file

@ -2614,7 +2614,9 @@ app.add_middleware(GZipBufferedResponseMiddleware)
# is set). Added inside SecurityHeaders so screened responses are still
# headered, and outside the auth dependencies so screened-and-blocked
# requests never reach key validation. See middleware/guard_middleware.py.
from litellm.proxy.middleware.guard_middleware import GuardMiddleware # noqa: E402
from litellm.proxy.middleware.guard_middleware import ( # noqa: E402 # mid-file attach: the middleware stack freezes once the lifespan runs
GuardMiddleware,
)
app.add_middleware(GuardMiddleware)