if isinstance(sweepable, dict):
// change dictionary of lists to list of dictionaries
// of single values using Cartesian product.
newsweepable = {}
for key, value in sweepable.items():
if isinstance(value, Iterable):
newsweepable[key] = value
else:
newsweepable[key] = [value]
expandsweepable = [
dict(zip(newsweepable.keys(), v))
for v in itertools.product(*newsweepable.values())
]
return [
_resolver_to_sweep(ParamResolver(cast(Dict, dictitem)))
for dictitem in expandsweepable
]
if isinstance(sweepable, Iterable) and not isinstance(sweepable, str):
return [
After Change
DeprecationWarning,
stacklevel=2)
product_sweep = dict_to_product_sweep(sweepable)
return [_resolver_to_sweep(resolver) for resolver in product_sweep]
if isinstance(sweepable, Iterable) and not isinstance(sweepable, str):
return [
sweep for item in sweepable for sweep in to_sweeps(