From 8d961e2b582f741f7f323a1aac91ece0a18e1a48 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 31 Oct 2024 16:59:08 -0700 Subject: [PATCH] Clean up clean up everybody do your share --- armi/physics/fuelCycle/tests/test_utils.py | 2 +- armi/physics/fuelCycle/utils.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/armi/physics/fuelCycle/tests/test_utils.py b/armi/physics/fuelCycle/tests/test_utils.py index 7a10621bf..3605fd647 100644 --- a/armi/physics/fuelCycle/tests/test_utils.py +++ b/armi/physics/fuelCycle/tests/test_utils.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from unittest import TestCase, mock +from unittest import TestCase import numpy as np diff --git a/armi/physics/fuelCycle/utils.py b/armi/physics/fuelCycle/utils.py index 731c72070..c00eab6f1 100644 --- a/armi/physics/fuelCycle/utils.py +++ b/armi/physics/fuelCycle/utils.py @@ -13,7 +13,6 @@ # limitations under the License. """Geometric agnostic routines that are useful for fuel cycle analysis.""" -import contextlib import typing import numpy as np @@ -74,9 +73,7 @@ def assemblyHasFuelPinBurnup(a: typing.Iterable["Block"]) -> bool: # fuel block. Same for avoiding Block.getChildrenWithFlags. return any( b.hasFlags(Flags.FUEL) - and ( - any(c.hasFlags(Flags.FUEL) and np.any(c.p.pinPercentBu) for c in b) - ) + and (any(c.hasFlags(Flags.FUEL) and np.any(c.p.pinPercentBu) for c in b)) for b in a ) @@ -144,4 +141,4 @@ def maxBurnupBlock(a: typing.Iterable["Block"]) -> "Block": maxBlock = b if maxBlock is not None: return maxBlock - raise ValueError(f"No blocks with burnup found") + raise ValueError("No blocks with burnup found")