Browse Source

Fix OAuth2 flow setter typing for pre-commit

pull/15041/head
Takrim Rahman Albi 4 months ago
parent
commit
b64518fe02
  1. 2
      fastapi/security/oauth2.py

2
fastapi/security/oauth2.py

@ -403,7 +403,7 @@ class OAuth2(SecurityBase):
*, *,
flows: OAuthFlowsModel | dict[str, dict[str, Any]], flows: OAuthFlowsModel | dict[str, dict[str, Any]],
) -> None: ) -> None:
self.model.flows = cast(OAuthFlowsModel, flows) cast(OAuth2Model, self.model).flows = cast(OAuthFlowsModel, flows)
def make_not_authenticated_error(self) -> HTTPException: def make_not_authenticated_error(self) -> HTTPException:
""" """

Loading…
Cancel
Save