@@ -157,8 +157,7 @@ def __init__(self, dataset: ObjId, granularity: str, from_shift: int, to_shift:
157157
158158 if granularity not in _GRANULARITY :
159159 raise ValueError (
160- f"Invalid relative date filter granularity '{ granularity } '."
161- f"It is expected to be one of: { _GRANULARITY } "
160+ f"Invalid relative date filter granularity '{ granularity } '. It is expected to be one of: { _GRANULARITY } "
162161 )
163162
164163 self ._dataset = dataset
@@ -373,8 +372,7 @@ def __init__(
373372 else :
374373 if not isinstance (values , (int , float )) and len (values ) != 1 :
375374 raise ValueError (
376- f"Invalid number of values for { operator } . "
377- f"Expected single int, float or one-sized list or tuple."
375+ f"Invalid number of values for { operator } . Expected single int, float or one-sized list or tuple."
378376 )
379377 # Convert int to float as AFM model filters accept float values
380378 self ._values = (float (values ),) if isinstance (values , (int , float )) else values
@@ -456,8 +454,7 @@ def __init__(
456454
457455 if operator not in _RANKING_OPERATORS :
458456 raise ValueError (
459- f"Invalid ranking filter operator type '{ operator } '."
460- f"It is expected to be one of: { _RANKING_OPERATORS } "
457+ f"Invalid ranking filter operator type '{ operator } '. It is expected to be one of: { _RANKING_OPERATORS } "
461458 )
462459
463460 self ._metrics = [_extract_id_or_local_id (m ) for m in metrics ]
@@ -504,6 +501,5 @@ def description(self, labels: dict[str, str], format_locale: Optional[str] = Non
504501 )
505502 metric_ids = [m .id if isinstance (m , ObjId ) else m for m in self .metrics ]
506503 return (
507- f"{ self .operator .capitalize ()} { self .value } { dimensionality_str } "
508- f"{ labels .get (metric_ids [0 ], metric_ids [0 ])} "
504+ f"{ self .operator .capitalize ()} { self .value } { dimensionality_str } { labels .get (metric_ids [0 ], metric_ids [0 ])} "
509505 )
0 commit comments