From e93dd66430d7cae137cae8798b72645cd2d32726 Mon Sep 17 00:00:00 2001 From: Kalin Kiesling Date: Thu, 23 Mar 2023 15:07:32 -0500 Subject: [PATCH] eliminate set/list redundancy Co-authored-by: Paul Romano --- openmc/deplete/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc/deplete/helpers.py b/openmc/deplete/helpers.py index 90d1ddde4a..ec0f656502 100644 --- a/openmc/deplete/helpers.py +++ b/openmc/deplete/helpers.py @@ -308,8 +308,8 @@ class FluxCollapseHelper(ReactionRateHelper): if self._nuclides_direct is not None: # check if any direct tally nuclides are requested that are not # already loaded with the materials. Load separately if so. - mat_nuclides = [n for mat in materials for n in mat.nuclides] - extra_nuclides = set(self._nuclides_direct) - set(mat_nuclides) + mat_nuclides = {n for mat in materials for n in mat.nuclides} + extra_nuclides = set(self._nuclides_direct) - mat_nuclides for nuc in extra_nuclides: load_nuclide(nuc) self._rate_tally.nuclides = self._nuclides_direct