Skip to content

Commit

Permalink
microoptimization: unnecessary list construction
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Oct 10, 2023
1 parent 1bb0e15 commit d77e464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiida/orm/autogroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def validate(strings: list[str] | None):
"""Validate the list of strings passed to set_include and set_exclude."""
if strings is None:
return
valid_prefixes = set(['aiida.node', 'aiida.calculations', 'aiida.workflows', 'aiida.data'])
valid_prefixes = {'aiida.node', 'aiida.calculations', 'aiida.workflows', 'aiida.data'}
for string in strings:
pieces = string.split(':')
if len(pieces) != 2:
Expand Down

0 comments on commit d77e464

Please sign in to comment.