]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔧 Fix Type hint of `auto_error` which does not need to be `Optional[bool]` (#4933)
authorDavid Kim <kdaeyoub@gmail.com>
Fri, 26 Aug 2022 13:29:50 +0000 (22:29 +0900)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2022 13:29:50 +0000 (15:29 +0200)
fastapi/security/oauth2.py

index 888208c1501fce70bc8c93ce14f724076d0ee14c..653c3010e58a3e4c39a7b8a97dcdc05d4cf1c67a 100644 (file)
@@ -119,7 +119,7 @@ class OAuth2(SecurityBase):
         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__