From d77e46404a169e77fbba3dd32eef92056224f71d Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 10 Oct 2023 03:35:38 +0100 Subject: [PATCH] microoptimization: unnecessary list construction --- aiida/orm/autogroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiida/orm/autogroup.py b/aiida/orm/autogroup.py index 2aadcfb72a..fa5b2d8838 100644 --- a/aiida/orm/autogroup.py +++ b/aiida/orm/autogroup.py @@ -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: