@@ -101,7 +101,7 @@ def get(
101101 """
102102if not isinstance (id ,int ):
103103id = utils .clean_str_id (id )
104- path = "%s/%s" % ( self .path , id )
104+ path = f" { self .path } / { id } "
105105if TYPE_CHECKING :
106106assert self ._obj_cls is not None
107107if lazy is True :
@@ -173,7 +173,7 @@ def refresh(self, **kwargs: Any) -> None:
173173 GitlabGetError: If the server cannot perform the request
174174 """
175175if self ._id_attr :
176- path = "%s/%s" % ( self .manager .path , self .id )
176+ path = f" { self .manager .path } / { self .id } "
177177else :
178178if TYPE_CHECKING :
179179assert self .manager .path is not None
@@ -273,7 +273,7 @@ def _check_missing_create_attrs(self, data: Dict[str, Any]) -> None:
273273missing .append (attr )
274274continue
275275if missing :
276- raise AttributeError ("Missing attributes:%s" % ", " .join (missing ))
276+ raise AttributeError (f "Missing attributes:{ ', ' .join (missing )} " )
277277
278278@exc .on_http_error (exc .GitlabCreateError )
279279def create (
@@ -349,7 +349,7 @@ def _check_missing_update_attrs(self, data: Dict[str, Any]) -> None:
349349missing .append (attr )
350350continue
351351if missing :
352- raise AttributeError ("Missing attributes:%s" % ", " .join (missing ))
352+ raise AttributeError (f "Missing attributes:{ ', ' .join (missing )} " )
353353
354354def _get_update_method (
355355self ,
@@ -370,7 +370,7 @@ def update(
370370self ,
371371id :Optional [Union [str ,int ]]= None ,
372372new_data :Optional [Dict [str ,Any ]]= None ,
373- ** kwargs :Any
373+ ** kwargs :Any ,
374374 )-> Dict [str ,Any ]:
375375"""Update an object on the server.
376376
@@ -391,7 +391,7 @@ def update(
391391if id is None :
392392path = self .path
393393else :
394- path = "%s/%s" % ( self .path , id )
394+ path = f" { self .path } / { id } "
395395
396396self ._check_missing_update_attrs (new_data )
397397files = {}
@@ -444,7 +444,7 @@ def set(self, key: str, value: str, **kwargs: Any) -> base.RESTObject:
444444 Returns:
445445 obj: The created/updated attribute
446446 """
447- path = "%s/%s" % ( self .path , utils .clean_str_id (key ))
447+ path = f" { self .path } / { utils .clean_str_id (key )} "
448448data = {"value" :value }
449449server_data = self .gitlab .http_put (path ,post_data = data ,** kwargs )
450450if TYPE_CHECKING :
@@ -479,7 +479,7 @@ def delete(self, id: Union[str, int], **kwargs: Any) -> None:
479479else :
480480if not isinstance (id ,int ):
481481id = utils .clean_str_id (id )
482- path = "%s/%s" % ( self .path , id )
482+ path = f" { self .path } / { id } "
483483self .gitlab .http_delete (path ,** kwargs )
484484
485485
@@ -598,7 +598,7 @@ def user_agent_detail(self, **kwargs: Any) -> Dict[str, Any]:
598598 GitlabAuthenticationError: If authentication is not correct
599599 GitlabGetError: If the server cannot perform the request
600600 """
601- path = "%s/%s/user_agent_detail" % ( self .manager .path , self .get_id ())
601+ path = f" { self .manager .path } / { self .get_id ()} /user_agent_detail"
602602result = self .manager .gitlab .http_get (path ,** kwargs )
603603if TYPE_CHECKING :
604604assert not isinstance (result ,requests .Response )
@@ -631,7 +631,7 @@ def approve(
631631 GitlabUpdateError: If the server fails to perform the request
632632 """
633633
634- path = "%s/%s/approve" % ( self .manager .path , self .id )
634+ path = f" { self .manager .path } / { self .id } /approve"
635635data = {"access_level" :access_level }
636636server_data = self .manager .gitlab .http_put (path ,post_data = data ,** kwargs )
637637if TYPE_CHECKING :
@@ -654,7 +654,7 @@ def download(
654654streamed :bool = False ,
655655action :Optional [Callable ]= None ,
656656chunk_size :int = 1024 ,
657- ** kwargs :Any
657+ ** kwargs :Any ,
658658 )-> Optional [bytes ]:
659659"""Download the archive of a resource export.
660660
@@ -674,7 +674,7 @@ def download(
674674 Returns:
675675 str: The blob content if streamed is False, None otherwise
676676 """
677- path = "%s/download" % ( self .manager .path )
677+ path = f" { self .manager .path } /download"
678678result = self .manager .gitlab .http_get (
679679path ,streamed = streamed ,raw = True ,** kwargs
680680 )
@@ -705,7 +705,7 @@ def subscribe(self, **kwargs: Any) -> None:
705705 GitlabAuthenticationError: If authentication is not correct
706706 GitlabSubscribeError: If the subscription cannot be done
707707 """
708- path = "%s/%s/subscribe" % ( self .manager .path , self .get_id ())
708+ path = f" { self .manager .path } / { self .get_id ()} /subscribe"
709709server_data = self .manager .gitlab .http_post (path ,** kwargs )
710710if TYPE_CHECKING :
711711assert not isinstance (server_data ,requests .Response )
@@ -725,7 +725,7 @@ def unsubscribe(self, **kwargs: Any) -> None:
725725 GitlabAuthenticationError: If authentication is not correct
726726 GitlabUnsubscribeError: If the unsubscription cannot be done
727727 """
728- path = "%s/%s/unsubscribe" % ( self .manager .path , self .get_id ())
728+ path = f" { self .manager .path } / { self .get_id ()} /unsubscribe"
729729server_data = self .manager .gitlab .http_post (path ,** kwargs )
730730if TYPE_CHECKING :
731731assert not isinstance (server_data ,requests .Response )
@@ -752,7 +752,7 @@ def todo(self, **kwargs: Any) -> None:
752752 GitlabAuthenticationError: If authentication is not correct
753753 GitlabTodoError: If the todo cannot be set
754754 """
755- path = "%s/%s/todo" % ( self .manager .path , self .get_id ())
755+ path = f" { self .manager .path } / { self .get_id ()} /todo"
756756self .manager .gitlab .http_post (path ,** kwargs )
757757
758758
@@ -781,7 +781,7 @@ def time_stats(self, **kwargs: Any) -> Dict[str, Any]:
781781if "time_stats" in self .attributes :
782782return self .attributes ["time_stats" ]
783783
784- path = "%s/%s/time_stats" % ( self .manager .path , self .get_id ())
784+ path = f" { self .manager .path } / { self .get_id ()} /time_stats"
785785result = self .manager .gitlab .http_get (path ,** kwargs )
786786if TYPE_CHECKING :
787787assert not isinstance (result ,requests .Response )
@@ -800,7 +800,7 @@ def time_estimate(self, duration: str, **kwargs: Any) -> Dict[str, Any]:
800800 GitlabAuthenticationError: If authentication is not correct
801801 GitlabTimeTrackingError: If the time tracking update cannot be done
802802 """
803- path = "%s/%s/time_estimate" % ( self .manager .path , self .get_id ())
803+ path = f" { self .manager .path } / { self .get_id ()} /time_estimate"
804804data = {"duration" :duration }
805805result = self .manager .gitlab .http_post (path ,post_data = data ,** kwargs )
806806if TYPE_CHECKING :
@@ -819,7 +819,7 @@ def reset_time_estimate(self, **kwargs: Any) -> Dict[str, Any]:
819819 GitlabAuthenticationError: If authentication is not correct
820820 GitlabTimeTrackingError: If the time tracking update cannot be done
821821 """
822- path = "%s/%s/reset_time_estimate" % ( self .manager .path , self .get_id ())
822+ path = f" { self .manager .path } / { self .get_id ()} /reset_time_estimate"
823823result = self .manager .gitlab .http_post (path ,** kwargs )
824824if TYPE_CHECKING :
825825assert not isinstance (result ,requests .Response )
@@ -838,7 +838,7 @@ def add_spent_time(self, duration: str, **kwargs: Any) -> Dict[str, Any]:
838838 GitlabAuthenticationError: If authentication is not correct
839839 GitlabTimeTrackingError: If the time tracking update cannot be done
840840 """
841- path = "%s/%s/add_spent_time" % ( self .manager .path , self .get_id ())
841+ path = f" { self .manager .path } / { self .get_id ()} /add_spent_time"
842842data = {"duration" :duration }
843843result = self .manager .gitlab .http_post (path ,post_data = data ,** kwargs )
844844if TYPE_CHECKING :
@@ -857,7 +857,7 @@ def reset_spent_time(self, **kwargs: Any) -> Dict[str, Any]:
857857 GitlabAuthenticationError: If authentication is not correct
858858 GitlabTimeTrackingError: If the time tracking update cannot be done
859859 """
860- path = "%s/%s/reset_spent_time" % ( self .manager .path , self .get_id ())
860+ path = f" { self .manager .path } / { self .get_id ()} /reset_spent_time"
861861result = self .manager .gitlab .http_post (path ,** kwargs )
862862if TYPE_CHECKING :
863863assert not isinstance (result ,requests .Response )
@@ -893,7 +893,7 @@ def participants(self, **kwargs: Any) -> Dict[str, Any]:
893893 RESTObjectList: The list of participants
894894 """
895895
896- path = "%s/%s/participants" % ( self .manager .path , self .get_id ())
896+ path = f" { self .manager .path } / { self .get_id ()} /participants"
897897result = self .manager .gitlab .http_get (path ,** kwargs )
898898if TYPE_CHECKING :
899899assert not isinstance (result ,requests .Response )
@@ -920,7 +920,7 @@ def render(self, link_url: str, image_url: str, **kwargs: Any) -> Dict[str, Any]
920920 Returns:
921921 dict: The rendering properties
922922 """
923- path = "%s/render" % self .path
923+ path = f" { self .path } /render"
924924data = {"link_url" :link_url ,"image_url" :image_url }
925925result = self .gitlab .http_get (path ,data ,** kwargs )
926926if TYPE_CHECKING :
@@ -967,7 +967,7 @@ def promote(self, **kwargs: Any) -> Dict[str, Any]:
967967 dict: The updated object data (*not* a RESTObject)
968968 """
969969
970- path = "%s/%s/promote" % ( self .manager .path , self .id )
970+ path = f" { self .manager .path } / { self .id } /promote"
971971http_method = self ._get_update_method ()
972972result = http_method (path ,** kwargs )
973973if TYPE_CHECKING :