@@ -979,9 +979,7 @@ def flatten_all(list_):
979979 # length 2 is for {VotingClassifier.estimators,
980980 # Pipeline.steps, FeatureUnion.transformer_list}
981981 # length 3 is for ColumnTransformer
982- msg = "Length of tuple of type {} does not match assumptions" .format (
983- sub_component_type ,
984- )
982+ msg = f"Length of tuple of type { sub_component_type } does not match assumptions"
985983 raise ValueError (msg )
986984
987985 if isinstance (sub_component , str ):
@@ -1008,9 +1006,9 @@ def flatten_all(list_):
10081006
10091007 if identifier in reserved_keywords :
10101008 parent_model = f"{ model .__module__ } .{ model .__class__ .__name__ } "
1011- msg = "Found element shadowing official " "parameter for {}: {}" . format (
1012- parent_model ,
1013- identifier ,
1009+ msg = (
1010+ "Found element shadowing official "
1011+ f"parameter for { parent_model } : { identifier } "
10141012 )
10151013 raise PyOpenMLError (msg )
10161014
@@ -1035,9 +1033,9 @@ def flatten_all(list_):
10351033 model = None ,
10361034 )
10371035 component_reference : OrderedDict [str , str | dict ] = OrderedDict ()
1038- component_reference [
1039- "oml-python:serialized_object"
1040- ] = COMPOSITION_STEP_CONSTANT
1036+ component_reference ["oml-python:serialized_object" ] = (
1037+ COMPOSITION_STEP_CONSTANT
1038+ )
10411039 cr_value : dict [str , Any ] = OrderedDict ()
10421040 cr_value ["key" ] = identifier
10431041 cr_value ["step_name" ] = identifier
@@ -1812,10 +1810,7 @@ def _prediction_to_probabilities(
18121810 # then we need to add a column full of zeros into the probabilities
18131811 # for class 3 because the rest of the library expects that the
18141812 # probabilities are ordered the same way as the classes are ordered).
1815- message = "Estimator only predicted for {}/{} classes!" .format (
1816- proba_y .shape [1 ],
1817- len (task .class_labels ),
1818- )
1813+ message = f"Estimator only predicted for { proba_y .shape [1 ]} /{ len (task .class_labels )} classes!"
18191814 warnings .warn (message , stacklevel = 2 )
18201815 openml .config .logger .warning (message )
18211816
@@ -2008,9 +2003,7 @@ def is_subcomponent_specification(values):
20082003 pass
20092004 else :
20102005 raise TypeError (
2011- "Subcomponent flow should be of type flow, but is {}" .format (
2012- type (subcomponent_flow ),
2013- ),
2006+ f"Subcomponent flow should be of type flow, but is { type (subcomponent_flow )} " ,
20142007 )
20152008
20162009 current = {
0 commit comments