Skip to content

Commit

Permalink
REF: Rename variable inside dictionary_product
Browse files Browse the repository at this point in the history
skipci
  • Loading branch information
cortadocodes committed Aug 6, 2024
1 parent d180fdc commit 681f476
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions octue/utils/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ def dictionary_product(keep_none_values=False, **kwargs):
iterables[key] = value

# Yield each possible combination from the Cartesian product of the kwargs' iterables.
for instance in itertools.product(*iterables.values()):
instance_dict = dict(zip(iterables.keys(), instance))
for combination in itertools.product(*iterables.values()):
combination_dict = dict(zip(iterables.keys(), combination))

# Optionally add the `None`-valued kwargs to what's yielded.
if keep_none_values:
instance_dict = {**instance_dict, **nones}
combination_dict = {**combination_dict, **nones}

yield instance_dict
yield combination_dict

0 comments on commit 681f476

Please sign in to comment.