From 672cd427fa58c2ec41acc6ed5dc2678fd35e3097 Mon Sep 17 00:00:00 2001 From: Renan Heckert Leal <123672970+lealre@users.noreply.github.com> Date: Fri, 13 Dec 2024 23:10:16 +0000 Subject: [PATCH] Add `pragma: no branch` in `middleware/exceptions.py` Co-authored-by: Marcelo Trylesinski --- starlette/middleware/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starlette/middleware/exceptions.py b/starlette/middleware/exceptions.py index d708929e3..981d2fcae 100644 --- a/starlette/middleware/exceptions.py +++ b/starlette/middleware/exceptions.py @@ -28,7 +28,7 @@ def __init__( HTTPException: self.http_exception, WebSocketException: self.websocket_exception, } - if handlers is not None: + if handlers is not None: # pragma: no branch for key, value in handlers.items(): self.add_exception_handler(key, value)