Skip to content

Commit

Permalink
No need to be Optional[bool]
Browse files Browse the repository at this point in the history
Default is True and If someone doesn't want auto_error option, then it should be False instead of None.  I guess It is more Pythonic.
  • Loading branch information
DavidKimDY committed May 20, 2022
1 parent 1876ebc commit 705b243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastapi/security/oauth2.py
Expand Up @@ -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__
Expand Down

0 comments on commit 705b243

Please sign in to comment.