@@ -38,7 +38,9 @@ class AuthDB(BaseSQLDB):
3838
3939 @classmethod
4040 async def post_create (cls , conn : AsyncConnection ) -> None :
41- """Create partitions if it is a MySQL DB and it does not have
41+ """Create partitions.
42+
43+ If it is a MySQL DB and it does not have
4244 it yet and the table does not have any data yet.
4345 We do this as a post_create step as sqlalchemy does not support
4446 partition so well.
@@ -115,7 +117,7 @@ async def device_flow_validate_user_code(
115117 return (await self .conn .execute (stmt )).scalar_one ()
116118
117119 async def get_device_flow (self , device_code : str ):
118- """:raises: NoResultFound"""
120+ """raise: NoResultFound. """
119121 # The with_for_update
120122 # prevents that the token is retrieved
121123 # multiple time concurrently
@@ -137,7 +139,7 @@ async def update_device_flow_status(
137139 async def device_flow_insert_id_token (
138140 self , user_code : str , id_token : dict [str , str ], max_validity : int
139141 ) -> None :
140- """:raises: AuthorizationError if no such code or status not pending"""
142+ """raise: AuthorizationError if no such code or status not pending. """
141143 stmt = update (DeviceFlows )
142144 stmt = stmt .where (
143145 DeviceFlows .user_code == user_code ,
@@ -211,7 +213,8 @@ async def insert_authorization_flow(
211213 async def authorization_flow_insert_id_token (
212214 self , uuid : str , id_token : dict [str , str ], max_validity : int
213215 ) -> tuple [str , str ]:
214- """Returns code, redirect_uri
216+ """Return code, redirect_uri.
217+
215218 :raises: AuthorizationError if no such uuid or status not pending.
216219 """
217220 # Hash the code to avoid leaking information
@@ -268,8 +271,9 @@ async def insert_refresh_token(
268271 subject : str ,
269272 scope : str ,
270273 ) -> None :
271- """Insert a refresh token in the DB as well as user attributes
272- required to generate access tokens.
274+ """Insert a refresh token in the DB.
275+
276+ As well as user attributes required to generate access tokens.
273277 """
274278 # Insert values into the DB
275279 stmt = insert (RefreshTokens ).values (
0 commit comments