@@ -64,7 +64,7 @@ async def create_sync(
6464
6565 Returns:
6666 """
67- logger .info ("Creating sync user with input: %s" , sync_user_input )
67+ logger .info (f "Creating sync user with input: { sync_user_input } " )
6868 try :
6969 sync = Sync .model_validate (sync_user_input .model_dump ())
7070 self .session .add (sync )
@@ -108,9 +108,7 @@ async def get_syncs(self, user_id: UUID, sync_id: int | None = None):
108108 list: A list of sync users matching the criteria.
109109 """
110110 logger .info (
111- "Retrieving sync users for user_id: %s, sync_user_id: %s" ,
112- user_id ,
113- sync_id ,
111+ f"Retrieving sync users for user_id: { user_id } , sync_user_id: { sync_id } " ,
114112 )
115113 query = select (Sync ).where (Sync .user_id == user_id )
116114 if sync_id is not None :
@@ -128,7 +126,7 @@ async def get_sync_user_by_state(self, state: dict) -> Sync:
128126 Returns:
129127 dict or None: The sync user data matching the state or None if not found.
130128 """
131- logger .info ("Getting sync user by state: %s" , state )
129+ logger .info (f "Getting sync user by state: { state } " )
132130
133131 query = select (Sync ).where (Sync .state == state )
134132 result = await self .session .exec (query )
@@ -140,9 +138,7 @@ async def get_sync_user_by_state(self, state: dict) -> Sync:
140138 return None
141139
142140 async def delete_sync (self , sync_id : int , user_id : UUID ):
143- logger .info (
144- "Deleting sync user with sync_id: %s, user_id: %s" , sync_id , user_id
145- )
141+ logger .info (f"Deleting sync user with sync_id: { sync_id } , user_id: { user_id } " )
146142 await self .session .execute (
147143 delete (Sync ).where (Sync .id == sync_id ).where (Sync .user_id == user_id ) # type: ignore
148144 )
@@ -151,11 +147,7 @@ async def delete_sync(self, sync_id: int, user_id: UUID):
151147 async def update_sync (
152148 self , sync : Sync , sync_input : SyncUpdateInput | dict [str , Any ]
153149 ):
154- logger .debug (
155- "Updating sync user with user_id: %s, state: %s, input: %s" ,
156- sync .id ,
157- sync_input ,
158- )
150+ logger .debug (f"Updating sync user with user_id: { sync .id } " )
159151 try :
160152 if isinstance (sync_input , dict ):
161153 update_data = sync_input
@@ -197,17 +189,12 @@ async def get_files_folder_user_sync(
197189 recursive : bool = False ,
198190 ) -> List [SyncFile ] | None :
199191 logger .info (
200- "Retrieving files for user sync with sync_active_id: %s, user_id: %s, folder_id: %s" ,
201- sync_id ,
202- user_id ,
203- folder_id ,
192+ f"Retrieving files for user sync with sync_active_id: { sync_id } , user_id: { user_id } , folder_id: { folder_id } " ,
204193 )
205194 sync = await self .get_sync_id (sync_id = sync_id , user_id = user_id )
206195 if not sync :
207196 logger .error (
208- "No sync user found for sync_active_id: %s, user_id: %s" ,
209- sync_id ,
210- user_id ,
197+ f"No sync user found for sync_active_id: { sync_id } , user_id: { user_id } " ,
211198 )
212199 return None
213200
0 commit comments