From 0539dd9cd35b7eb3b19945c19c1dc569440c0ec1 Mon Sep 17 00:00:00 2001 From: David Kim Date: Fri, 26 Aug 2022 22:29:50 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fix=20Type=20hint=20of=20`auto?= =?UTF-8?q?=5Ferror`=20which=20does=20not=20need=20to=20be=20`Optional[boo?= =?UTF-8?q?l]`=20(#4933)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/security/oauth2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/security/oauth2.py b/fastapi/security/oauth2.py index 888208c1501fc..653c3010e58a3 100644 --- a/fastapi/security/oauth2.py +++ b/fastapi/security/oauth2.py @@ -119,7 +119,7 @@ def __init__( flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]] = OAuthFlowsModel(), scheme_name: Optional[str] = None, description: Optional[str] = None, - auto_error: Optional[bool] = True + auto_error: bool = True ): self.model = OAuth2Model(flows=flows, description=description) self.scheme_name = scheme_name or self.__class__.__name__