Skip to content

Commit 52d1195

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 02fdbfe commit 52d1195

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/snapred/backend/data/GroceryService.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,8 +1520,12 @@ def combinePixelMasks(self, outputMaskWsName: WorkspaceName, masks2Combine: List
15201520
raise ValueError("Internal Error: Lists of masks to combine is empty")
15211521

15221522
if not self.mantidSnapper.mtd.doesExist(outputMaskWsName):
1523-
raise ValueError(("Internal Error: outputMaskWs should exist before attempting to combine masks with it. "
1524-
"Consider using fetchCompatiblePixelMask to generate it."))
1523+
raise ValueError(
1524+
(
1525+
"Internal Error: outputMaskWs should exist before attempting to combine masks with it. "
1526+
"Consider using fetchCompatiblePixelMask to generate it."
1527+
)
1528+
)
15251529

15261530
for maskWsName in masks2Combine:
15271531
if maskWsName == outputMaskWsName:

src/snapred/backend/recipe/algorithm/ConjoinDiagnosticWorkspaces.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
logger = snapredLogger.getLogger(__name__)
2222

23+
2324
class ConjoinDiagnosticWorkspaces(PythonAlgorithm):
2425
"""
2526
Given the grouped diagnostic output from PDCalibration run on one spectum at a time,
@@ -139,13 +140,13 @@ def conjoinMatrixWorkspaces(self, inws, outws, index):
139140
CheckOverlapping=False,
140141
CheckMatchingBins=False, # Not available in 6.11.0.3rc2
141142
)
142-
143-
# TODO: Remove when Defect 14460 is resolved.
143+
144+
# TODO: Remove when Defect 14460 is resolved.
144145
# There is a defect in ConjoinWorkspaces that incorrectly determines
145146
# if spectrum numbers need to be remapped.
146147
for i, specNum in enumerate(specNumbers):
147148
mtd[outws].getSpectrum(i).setSpectrumNo(specNum)
148-
149+
149150
logger.debug(f"resulting spectrum numbers: {mtd[outws].getSpectrumNumbers()}")
150151
if self.autoDelete and inws in mtd:
151152
DeleteWorkspace(inws)

tests/unit/backend/service/test_CalibrationService.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def test_fetchDiffractionCalibrationGroceries(self):
808808
[calibrationMaskName, "mask1", "mask2", combinedMask],
809809
)
810810
assert self.instance.groceryService.mantidSnapper.BinaryOperateMasks.called
811-
811+
812812
@mock.patch(thisService + "SimpleDiffCalRequest", spec_set=SimpleDiffCalRequest)
813813
def test_diffractionCalibration_calls_others(self, SimpleDiffCalRequest):
814814
# mock out external functionalties

0 commit comments

Comments
 (0)