Skip to content

Commit

Permalink
Use Set Literals Instead of Sets from Lists (#517)
Browse files Browse the repository at this point in the history
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
  • Loading branch information
pixeebot[bot] authored Feb 20, 2024
1 parent b0310c0 commit cb0dc86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/python/zigopt/conditionals/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def convert_to_unconditioned_experiment(experiment):

def check_all_conditional_values_satisfied(experiment_meta):
num_conditional_values = numpy.product([len(c.values) for c in experiment_meta.conditionals])
satisfied_parameter_configurations = set([])
satisfied_parameter_configurations = set()
for parameter in experiment_meta.all_parameters_unsorted:
conditional_values = []
for conditional in experiment_meta.conditionals:
Expand Down
2 changes: 1 addition & 1 deletion src/python/zigopt/protobuf/dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def _validate_class(fields: Sequence[FieldDescriptor]) -> None:
seen_names = set([])
seen_names = set()
for field in fields:
serialize_name = field.json_name or field.name # type: ignore
if serialize_name in seen_names:
Expand Down

0 comments on commit cb0dc86

Please sign in to comment.