diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py index ed43c0914ff6ca57cb2cbf26fa7d0fed2d684320..341cfc023723feace923469d5530e72f8491c005 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py @@ -95,7 +95,7 @@ class HFIRSANSReduction(PythonAlgorithm): self.default_output_dir = head return output_str - def PyExec(self): + def PyExec(self): # noqa: C901 filename = self.getProperty("Filename").value output_ws = self.getPropertyValue("OutputWorkspace") #output_ws = '__'+output_ws+'_reduced' diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py index d726339dcfe501f8b53b6a3e106ecb37ba7642dd..f62feba05cd0a8175c4f28095fa6fd02c5d07ddc 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py @@ -60,8 +60,7 @@ class SANSBeamSpreaderTransmission(PythonAlgorithm): self.declareProperty("OutputMessage", "", direction=Direction.Output, doc = "Output message") - #pylint: disable=too-many-locals,too-many-branches - def PyExec(self): + def PyExec(self): # noqa: C901 # Get the reduction property manager property_manager_name = self.getProperty("ReductionProperties").value property_manager = PropertyManagerDataService.retrieve(property_manager_name) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py index 80c8320c6ccbb51fb33a6d3400e5f98e030bfdb6..7a3be835da5a124d52af8b218ddb1520dd26512c 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py @@ -85,8 +85,7 @@ class SANSReduction(PythonAlgorithm): output_str += self._load_data(data_file, workspace, property_manager, property_manager_name) return output_str - #pylint: disable=too-many-locals,too-many-branches - def _py_exec(self): + def _py_exec(self): # noqa: C901 filename = self.getProperty("Filename").value output_ws = self.getPropertyValue("OutputWorkspace") property_manager_name = self.getProperty("ReductionProperties").value diff --git a/scripts/SANS/ISISCommandInterface.py b/scripts/SANS/ISISCommandInterface.py index d2b27b10ea938ad1516783a1add52508af4f05b2..ed12dda94916fb057de2ad93d5f72344404f1cc0 100644 --- a/scripts/SANS/ISISCommandInterface.py +++ b/scripts/SANS/ISISCommandInterface.py @@ -371,7 +371,7 @@ def GetMismatchedDetList(): # pylint: disable = too-many-branches -def WavRangeReduction(wav_start=None, wav_end=None, full_trans_wav=None, name_suffix=None, combineDet=None, +def WavRangeReduction(wav_start=None, wav_end=None, full_trans_wav=None, name_suffix=None, combineDet=None, # noqa: C901 resetSetup=True, out_fit_settings=dict()): """ Run reduction from loading the raw data to calculating Q. Its optional arguments allows specifics diff --git a/scripts/SANS/SANSBatchMode.py b/scripts/SANS/SANSBatchMode.py index 533a1a271fa929fe2041c94610ca1400129691ed..3bc9e9a3028c28f5ec3e23908860a704084688a8 100644 --- a/scripts/SANS/SANSBatchMode.py +++ b/scripts/SANS/SANSBatchMode.py @@ -178,7 +178,7 @@ def get_geometry_properties(reducer): return geometry_properties -def BatchReduce(filename, format, plotresults=False, saveAlgs={'SaveRKH':'txt'},verbose=False, +def BatchReduce(filename, format, plotresults=False, saveAlgs={'SaveRKH':'txt'},verbose=False, # noqa: C901 centreit=False, reducer=None, combineDet=None, save_as_zero_error_free=False): """ @param filename: the CSV file with the list of runs to analyse diff --git a/scripts/SANS/SANSUtility.py b/scripts/SANS/SANSUtility.py index 9610badf0c38bbd2316c9587821a564239c7bf3d..56e04e1d04fbc6d05d915bc61bd48d70713ea016 100644 --- a/scripts/SANS/SANSUtility.py +++ b/scripts/SANS/SANSUtility.py @@ -365,7 +365,7 @@ def slice2histogram(ws_event, time_start, time_stop, monitor, binning=""): return hist, (tot_t, tot_c, part_t, part_c) -def sliceParser(str_to_parser): +def sliceParser(str_to_parser): # noqa: C901 """ Create a list of boundaries from a string defing the slices. Valid syntax is: diff --git a/scripts/SANS/SANSadd2.py b/scripts/SANS/SANSadd2.py index ac1bfe588c7b01c530d2fd55ccd9122dd3f73dc9..692c0b3b179939930edead428a2c31745dd229ac 100644 --- a/scripts/SANS/SANSadd2.py +++ b/scripts/SANS/SANSadd2.py @@ -18,7 +18,7 @@ ADD_FILES_NEW_TEMPORARY = "AddFilesNewTempory" ADD_FILES_NEW_TEMPORARY_MONITORS = "AddFilesNewTempory_monitors" -def add_runs(runs, inst='sans2d', defType='.nxs', rawTypes=('.raw', '.s*', 'add','.RAW'), lowMem=False, +def add_runs(runs, inst='sans2d', defType='.nxs', rawTypes=('.raw', '.s*', 'add','.RAW'), lowMem=False, # noqa: C901 binning='Monitors', saveAsEvent=False, isOverlay = False, time_shifts=None): if inst.upper() == "SANS2DTUBES": inst = "SANS2D" diff --git a/scripts/SANS/isis_reduction_steps.py b/scripts/SANS/isis_reduction_steps.py index 65d072ea271150f764986032f9d09d374a3325dd..5f75bdb166e5a5cabe9ebdeb80db0bc8edcfbbfa 100644 --- a/scripts/SANS/isis_reduction_steps.py +++ b/scripts/SANS/isis_reduction_steps.py @@ -710,7 +710,7 @@ class Mask_ISIS(ReductionStep): return bank - def parse_instruction(self, instName, details): + def parse_instruction(self, instName, details): # noqa: C901 """ Parse an instruction line from an ISIS mask file @param instName Instrument name. Used for MASK Ssp command to tell what bank it refer to @@ -3270,7 +3270,7 @@ class UserFile(ReductionStep): self.executed = True return self.executed - def read_line(self, line, reducer): + def read_line(self, line, reducer): # noqa: C901 # This is so that I can be sure all EOL characters have been removed line = line.lstrip().rstrip() upper_line = line.upper() @@ -3443,7 +3443,7 @@ class UserFile(ReductionStep): reducer._corr_and_scale.rescale = 100.0 # Read a limit line of a mask file - def readLimitValues(self, limit_line, reducer): + def readLimitValues(self, limit_line, reducer): # noqa: C901 limits = limit_line.split('L/') if len(limits) != 2: _issueWarning("Incorrectly formatted limit line ignored \"" + limit_line + "\"") @@ -3541,7 +3541,7 @@ class UserFile(ReductionStep): else: _issueWarning('Error in user file after L/, "%s" is not a valid limit line' % limit_type.upper()) - def _read_mon_line(self, details, reducer): + def _read_mon_line(self, details, reducer): # noqa: C901 # MON/LENTH, MON/SPECTRUM and MON/TRANS all accept the INTERPOLATE option interpolate = False