@@ -32,8 +32,7 @@ def list_evaluations(
3232 per_fold : bool | None = ...,
3333 sort_order : str | None = ...,
3434 output_format : Literal ["dict" , "object" ] = "dict" ,
35- ) -> dict :
36- ...
35+ ) -> dict : ...
3736
3837
3938@overload
@@ -51,8 +50,7 @@ def list_evaluations(
5150 per_fold : bool | None = ...,
5251 sort_order : str | None = ...,
5352 output_format : Literal ["dataframe" ] = ...,
54- ) -> pd .DataFrame :
55- ...
53+ ) -> pd .DataFrame : ...
5654
5755
5856def list_evaluations (
@@ -204,24 +202,24 @@ def _list_evaluations(
204202 -------
205203 dict of objects, or dataframe
206204 """
207- api_call = "evaluation/list/function/%s" % function
205+ api_call = f "evaluation/list/function/{ function } "
208206 if kwargs is not None :
209207 for operator , value in kwargs .items ():
210208 api_call += f"/{ operator } /{ value } "
211209 if tasks is not None :
212- api_call += "/task/%s" % "," .join ([str (int (i )) for i in tasks ])
210+ api_call += "/task/{}" . format ( "," .join ([str (int (i )) for i in tasks ]) )
213211 if setups is not None :
214- api_call += "/setup/%s" % "," .join ([str (int (i )) for i in setups ])
212+ api_call += "/setup/{}" . format ( "," .join ([str (int (i )) for i in setups ]) )
215213 if flows is not None :
216- api_call += "/flow/%s" % "," .join ([str (int (i )) for i in flows ])
214+ api_call += "/flow/{}" . format ( "," .join ([str (int (i )) for i in flows ]) )
217215 if runs is not None :
218- api_call += "/run/%s" % "," .join ([str (int (i )) for i in runs ])
216+ api_call += "/run/{}" . format ( "," .join ([str (int (i )) for i in runs ]) )
219217 if uploaders is not None :
220- api_call += "/uploader/%s" % "," .join ([str (int (i )) for i in uploaders ])
218+ api_call += "/uploader/{}" . format ( "," .join ([str (int (i )) for i in uploaders ]) )
221219 if study is not None :
222220 api_call += "/study/%d" % study
223221 if sort_order is not None :
224- api_call += "/sort_order/%s" % sort_order
222+ api_call += f "/sort_order/{ sort_order } "
225223
226224 return __list_evaluations (api_call , output_format = output_format )
227225
@@ -236,7 +234,7 @@ def __list_evaluations(
236234 # Minimalistic check if the XML is useful
237235 if "oml:evaluations" not in evals_dict :
238236 raise ValueError (
239- "Error in return XML, does not contain " '"oml:evaluations": %s' % str ( evals_dict ) ,
237+ "Error in return XML, does not contain " f '"oml:evaluations": { evals_dict !s } ' ,
240238 )
241239
242240 assert isinstance (evals_dict ["oml:evaluations" ]["oml:evaluation" ], list ), type (
0 commit comments