]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Add `pragma: no branch` in `middleware/exceptions.py`
authorRenan Heckert Leal <123672970+lealre@users.noreply.github.com>
Fri, 13 Dec 2024 23:10:16 +0000 (23:10 +0000)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 23:10:16 +0000 (23:10 +0000)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
starlette/middleware/exceptions.py

index d708929e3bae38a055885aa9dd4573b25c87aa3e..981d2fcaef87c2d3fadb54c83afeb88ccdbaf561 100644 (file)
@@ -28,7 +28,7 @@ class ExceptionMiddleware:
             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)