From 84c72140d3ad6a31a0c82c806d47ea6140e8e67d Mon Sep 17 00:00:00 2001 From: ndxmrb Date: Mon, 19 Aug 2024 17:47:19 +0200 Subject: [PATCH] style: linting --- fastapi_azure_auth/exceptions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastapi_azure_auth/exceptions.py b/fastapi_azure_auth/exceptions.py index 1792a2a..ca3f7f2 100644 --- a/fastapi_azure_auth/exceptions.py +++ b/fastapi_azure_auth/exceptions.py @@ -1,4 +1,5 @@ from __future__ import annotations + from fastapi import HTTPException, WebSocketException, status from starlette.requests import HTTPConnection @@ -10,7 +11,7 @@ class InvalidAuthHttp(HTTPException): def __init__(self, detail: str) -> None: super().__init__( - status_code=status.HTTP_401_UNAUTHORIZED, detail=detail, headers={'WWW-Authenticate': 'Bearer'} + status_code=status.HTTP_401_UNAUTHORIZED, detail=detail, headers={"WWW-Authenticate": "Bearer"} ) @@ -30,6 +31,6 @@ def InvalidAuth(detail: str, request: HTTPConnection) -> InvalidAuthHttp | Inval """ Returns the correct exception based on the connection type """ - if request.scope['type'] == 'http': + if request.scope["type"] == "http": return InvalidAuthHttp(detail) return InvalidAuthWebSocket(detail)