@@ -20,11 +20,11 @@ async def get_commits(
2020 db : AsyncSession = Depends (get_database ),
2121):
2222 logger = get_logger ("api.commits" )
23- logger .info (f "Fetching commits" , extra = {"skip" : skip , "limit" : limit })
23+ logger .info ("Fetching commits" , extra = {"skip" : skip , "limit" : limit })
2424
2525 try :
2626 commits = await crud .get_commits (db , skip = skip , limit = limit )
27- logger .info (f "Successfully retrieved commits" , extra = {"count" : len (commits )})
27+ logger .info ("Successfully retrieved commits" , extra = {"count" : len (commits )})
2828
2929 return [
3030 schemas .Commit (
@@ -41,23 +41,23 @@ async def get_commits(
4141 for commit in commits
4242 ]
4343 except Exception as e :
44- logger .error (f "Failed to fetch commits" , extra = {"error" : str (e )})
44+ logger .error ("Failed to fetch commits" , extra = {"error" : str (e )})
4545 raise HTTPException (status_code = 500 , detail = "Failed to fetch commits" )
4646
4747
4848@router .get ("/commits/{sha}" , response_model = schemas .Commit )
4949async def get_commit (sha : str , db : AsyncSession = Depends (get_database )):
5050 logger = get_logger ("api.commits" )
51- logger .info (f "Fetching commit by SHA" , extra = {"sha" : sha })
51+ logger .info ("Fetching commit by SHA" , extra = {"sha" : sha })
5252
5353 try :
5454 commit = await crud .get_commit_by_sha (db , sha = sha )
5555 if commit is None :
56- logger .warning (f "Commit not found" , extra = {"sha" : sha })
56+ logger .warning ("Commit not found" , extra = {"sha" : sha })
5757 raise HTTPException (status_code = 404 , detail = "Commit not found" )
5858
5959 logger .info (
60- f "Successfully retrieved commit" ,
60+ "Successfully retrieved commit" ,
6161 extra = {
6262 "sha" : commit .sha [:8 ],
6363 "author" : commit .author ,
@@ -79,7 +79,7 @@ async def get_commit(sha: str, db: AsyncSession = Depends(get_database)):
7979 except HTTPException :
8080 raise
8181 except Exception as e :
82- logger .error (f "Failed to fetch commit" , extra = {"sha" : sha , "error" : str (e )})
82+ logger .error ("Failed to fetch commit" , extra = {"sha" : sha , "error" : str (e )})
8383 raise HTTPException (status_code = 500 , detail = "Failed to fetch commit" )
8484
8585
0 commit comments