mirror of https://github.com/tiangolo/fastapi.git
🔧 Fix Type hint of `auto_error` which does not need to be `Optional[bool]` (#4933)
This commit is contained in:
parent
aaf5a380df
commit
0539dd9cd3
|
|
@ -119,7 +119,7 @@ class OAuth2(SecurityBase):
|
||||||
flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]] = OAuthFlowsModel(),
|
flows: Union[OAuthFlowsModel, Dict[str, Dict[str, Any]]] = OAuthFlowsModel(),
|
||||||
scheme_name: Optional[str] = None,
|
scheme_name: Optional[str] = None,
|
||||||
description: Optional[str] = None,
|
description: Optional[str] = None,
|
||||||
auto_error: Optional[bool] = True
|
auto_error: bool = True
|
||||||
):
|
):
|
||||||
self.model = OAuth2Model(flows=flows, description=description)
|
self.model = OAuth2Model(flows=flows, description=description)
|
||||||
self.scheme_name = scheme_name or self.__class__.__name__
|
self.scheme_name = scheme_name or self.__class__.__name__
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue