From 0ff1433748d092b4ed79de653a7bcd7a8cfaa5ea Mon Sep 17 00:00:00 2001 From: ndxmrb Date: Tue, 20 Aug 2024 09:17:51 +0200 Subject: [PATCH] Revert "style: linting" This reverts commit 84c72140d3ad6a31a0c82c806d47ea6140e8e67d. --- fastapi_azure_auth/exceptions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fastapi_azure_auth/exceptions.py b/fastapi_azure_auth/exceptions.py index ca3f7f2..1792a2a 100644 --- a/fastapi_azure_auth/exceptions.py +++ b/fastapi_azure_auth/exceptions.py @@ -1,5 +1,4 @@ from __future__ import annotations - from fastapi import HTTPException, WebSocketException, status from starlette.requests import HTTPConnection @@ -11,7 +10,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'} ) @@ -31,6 +30,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)