@@ -219,7 +219,9 @@ def validate_config(raw_config: dict[str, Any]) -> None:
219219 defaults = raw_config .get ("defaults" , {})
220220 if not isinstance (defaults , dict ):
221221 raise BenchmarkConfigError ("Config field 'defaults' must be a mapping" )
222- _validate_default_or_entry (defaults , context = "defaults" , require_algorithm = False )
222+ _validate_default_or_entry (
223+ defaults , context = "defaults" , require_algorithm = False
224+ )
223225
224226 profiles = raw_config .get ("profiles" , {})
225227 if not isinstance (profiles , dict ):
@@ -375,7 +377,9 @@ def _validate_default_or_entry(
375377 )
376378
377379 for numeric_field in ("n_reps" , "random_state" ):
378- if numeric_field in entry and not isinstance (entry [numeric_field ], int ):
380+ if numeric_field in entry and not isinstance (
381+ entry [numeric_field ], int
382+ ):
379383 raise BenchmarkConfigError (
380384 f"{ context } field '{ numeric_field } ' must be an integer"
381385 )
@@ -389,7 +393,9 @@ def _validate_default_or_entry(
389393 if "rows" in entry :
390394 _normalize_int_list (entry ["rows" ], field_name = f"{ context } .rows" )
391395 if "features" in entry :
392- _normalize_int_list (entry ["features" ], field_name = f"{ context } .features" )
396+ _normalize_int_list (
397+ entry ["features" ], field_name = f"{ context } .features"
398+ )
393399 if "shapes" in entry :
394400 _normalize_shapes (entry ["shapes" ], field_name = f"{ context } .shapes" )
395401
@@ -454,7 +460,9 @@ def _apply_defaults(
454460
455461def _validate_post_defaults_entry (entry : dict [str , Any ]) -> None :
456462 _validate_default_or_entry (
457- entry , context = f"benchmark '{ entry .get ('id' , entry ['algorithm' ])} '" , require_algorithm = True
463+ entry ,
464+ context = f"benchmark '{ entry .get ('id' , entry ['algorithm' ])} '" ,
465+ require_algorithm = True ,
458466 )
459467
460468 benchmark_name = entry .get ("id" , entry ["algorithm" ])
@@ -600,7 +608,8 @@ def _apply_algorithm_filter(
600608
601609
602610def _build_override_list (
603- fixed_values : dict [str , Any ] | None , grid_values : dict [str , list [Any ]] | None
611+ fixed_values : dict [str , Any ] | None ,
612+ grid_values : dict [str , list [Any ]] | None ,
604613) -> list [dict [str , Any ]]:
605614 fixed = deepcopy (fixed_values or {})
606615 grid = deepcopy (grid_values or {})
@@ -645,9 +654,7 @@ def _normalize_int_list(
645654 return value
646655
647656
648- def _normalize_shapes (
649- value : Any , * , field_name : str
650- ) -> list [dict [str , int ]]:
657+ def _normalize_shapes (value : Any , * , field_name : str ) -> list [dict [str , int ]]:
651658 if not isinstance (value , list ) or not value :
652659 raise BenchmarkConfigError (
653660 f"Field '{ field_name } ' must be a non-empty list"
0 commit comments