From 2f6931cb7918940f574b080c354ba7405796c367 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:15:04 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/snapred/backend/recipe/ReductionRecipe.py | 6 ++++-- tests/unit/backend/recipe/test_ReductionRecipe.py | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/snapred/backend/recipe/ReductionRecipe.py b/src/snapred/backend/recipe/ReductionRecipe.py index fb679cd06..7d38a264e 100644 --- a/src/snapred/backend/recipe/ReductionRecipe.py +++ b/src/snapred/backend/recipe/ReductionRecipe.py @@ -87,7 +87,9 @@ def _deleteWorkspace(self, workspace: str): ) self.mantidSnapper.executeQueue() - def _prepareUnfocusedData(self, workspace: WorkspaceName, mask: Optional[WorkspaceName], units: str) -> WorkspaceName: + def _prepareUnfocusedData( + self, workspace: WorkspaceName, mask: Optional[WorkspaceName], units: str + ) -> WorkspaceName: unitsAbrev = "" match units: case "Wavelength": @@ -111,7 +113,7 @@ def _prepareUnfocusedData(self, workspace: WorkspaceName, mask: Optional[Workspa MaskWorkspace=mask, OutputWorkspace=self.unfocWs, ) - + self.mantidSnapper.ConvertUnits( f"Converting unfocused data to {units} units", InputWorkspace=self.unfocWs, diff --git a/tests/unit/backend/recipe/test_ReductionRecipe.py b/tests/unit/backend/recipe/test_ReductionRecipe.py index b51956843..e7c8472e3 100644 --- a/tests/unit/backend/recipe/test_ReductionRecipe.py +++ b/tests/unit/backend/recipe/test_ReductionRecipe.py @@ -142,19 +142,17 @@ def test_prepareUnfocusedData_masking(self): recipe._prepareUnfocusedData(workspace, None, units) recipe.mantidSnapper.MaskDetectorFlags.assert_not_called() recipe.mantidSnapper.reset_mock() - + recipe._prepareUnfocusedData(workspace, maskWs, units) recipe.mantidSnapper.MaskDetectorFlags.assert_called_once_with( - "Applying pixel mask to unfocused data", - MaskWorkspace=maskWs, - OutputWorkspace=outputWs + "Applying pixel mask to unfocused data", MaskWorkspace=maskWs, OutputWorkspace=outputWs ) recipe.mantidSnapper.ConvertUnits.assert_called_once_with( f"Converting unfocused data to {units} units", InputWorkspace=outputWs, OutputWorkspace=outputWs, - Target=units + Target=units, ) recipe.mantidSnapper.executeQueue.assert_called() recipe.mantidSnapper.reset_mock()