From b1b257837931d8668a9d2c067de60f8769ed92ce Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Wed, 11 Jun 2025 20:07:50 +0200 Subject: [PATCH] Fix mypy warnings --- fastapi/security/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi/security/http.py b/fastapi/security/http.py index 991101982..7d106fbe1 100644 --- a/fastapi/security/http.py +++ b/fastapi/security/http.py @@ -355,7 +355,7 @@ class HTTPBearer(HTTPBase): return None return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials) - def _raise_not_authenticated_error(self, error_message: str): + def _raise_not_authenticated_error(self, error_message: str) -> None: if self.not_authenticated_status_code == HTTP_403_FORBIDDEN: raise HTTPException(status_code=HTTP_403_FORBIDDEN, detail=error_message) else: @@ -492,7 +492,7 @@ class HTTPDigest(HTTPBase): return None return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials) - def _raise_not_authenticated_error(self, error_message: str): + def _raise_not_authenticated_error(self, error_message: str) -> None: if self.not_authenticated_status_code == HTTP_403_FORBIDDEN: raise HTTPException(status_code=HTTP_403_FORBIDDEN, detail=error_message) else: