66from pydantic import TypeAdapter
77
88from ..helpers import (
9- validate_uuid ,
109 model_validate ,
1110 parse_link_response ,
1211 parse_user_response ,
12+ validate_uuid ,
1313)
1414from ..http_clients import AsyncClient
1515from ..types import (
@@ -57,15 +57,15 @@ def __init__(
5757 )
5858 # TODO(@o-santi): why is is this done this way?
5959 self .mfa = AsyncGoTrueAdminMFAAPI ()
60- self .mfa .list_factors = self ._list_factors # type: ignore
61- self .mfa .delete_factor = self ._delete_factor # type: ignore
60+ self .mfa .list_factors = self ._list_factors # type: ignore
61+ self .mfa .delete_factor = self ._delete_factor # type: ignore
6262 self .oauth = AsyncGoTrueAdminOAuthAPI ()
63- self .oauth .list_clients = self ._list_oauth_clients # type: ignore
64- self .oauth .create_client = self ._create_oauth_client # type: ignore
65- self .oauth .get_client = self ._get_oauth_client # type: ignore
66- self .oauth .update_client = self ._update_oauth_client # type: ignore
67- self .oauth .delete_client = self ._delete_oauth_client # type: ignore
68- self .oauth .regenerate_client_secret = self ._regenerate_oauth_client_secret # type: ignore
63+ self .oauth .list_clients = self ._list_oauth_clients # type: ignore
64+ self .oauth .create_client = self ._create_oauth_client # type: ignore
65+ self .oauth .get_client = self ._get_oauth_client # type: ignore
66+ self .oauth .update_client = self ._update_oauth_client # type: ignore
67+ self .oauth .delete_client = self ._delete_oauth_client # type: ignore
68+ self .oauth .regenerate_client_secret = self ._regenerate_oauth_client_secret # type: ignore
6969
7070 async def sign_out (self , jwt : str , scope : SignOutScope = "global" ) -> None :
7171 """
@@ -276,9 +276,8 @@ async def _create_oauth_client(
276276 body = params ,
277277 )
278278
279- return OAuthClientResponse (
280- client = model_validate (OAuthClient , response .content )
281- )
279+ return OAuthClientResponse (client = model_validate (OAuthClient , response .content ))
280+
282281 async def _get_oauth_client (
283282 self ,
284283 client_id : str ,
@@ -295,9 +294,7 @@ async def _get_oauth_client(
295294 "GET" ,
296295 f"admin/oauth/clients/{ client_id } " ,
297296 )
298- return OAuthClientResponse (
299- client = model_validate (OAuthClient , response .content )
300- )
297+ return OAuthClientResponse (client = model_validate (OAuthClient , response .content ))
301298
302299 async def _update_oauth_client (
303300 self ,
@@ -317,9 +314,7 @@ async def _update_oauth_client(
317314 f"admin/oauth/clients/{ client_id } " ,
318315 body = params ,
319316 )
320- return OAuthClientResponse (
321- client = model_validate (OAuthClient , response .content )
322- )
317+ return OAuthClientResponse (client = model_validate (OAuthClient , response .content ))
323318
324319 async def _delete_oauth_client (
325320 self ,
@@ -354,6 +349,4 @@ async def _regenerate_oauth_client_secret(
354349 "POST" ,
355350 f"admin/oauth/clients/{ client_id } /regenerate_secret" ,
356351 )
357- return OAuthClientResponse (
358- client = model_validate (OAuthClient , response .content )
359- )
352+ return OAuthClientResponse (client = model_validate (OAuthClient , response .content ))
0 commit comments