Skip to content

Commit

Permalink
Revert "style: linting"
Browse files Browse the repository at this point in the history
This reverts commit 84c7214.
  • Loading branch information
ndxmrb committed Aug 20, 2024
1 parent 84c7214 commit 0ff1433
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fastapi_azure_auth/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import annotations

from fastapi import HTTPException, WebSocketException, status
from starlette.requests import HTTPConnection

Expand All @@ -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'}
)


Expand All @@ -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)

0 comments on commit 0ff1433

Please sign in to comment.