From ca65fe28d39e75ff042a48d31582d99e7c9939f4 Mon Sep 17 00:00:00 2001 From: Mathieu Doucet <matd10@yahoo.com> Date: Mon, 22 Feb 2016 13:51:08 -0500 Subject: [PATCH] Fix pylint errors --- .../plugins/algorithms/LRDirectBeamSort.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py b/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py index aa903ddd441..96c9183c2f3 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py +++ b/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py @@ -1,16 +1,12 @@ #pylint: disable=no-init,invalid-name -import math -import time -import numpy as np import mantid from mantid.api import * from mantid.simpleapi import * from mantid.kernel import * -import logging class CompareTwoNXSDataForSFcalculator(object): """ - will return -1, 0 or 1 according to the position of the nexusToPosition in relation to the + will return -1, 0 or 1 according to the position of the nexusToPosition in relation to the nexusToCompareWith based on the following criteria #1: number of attenuators (ascending order) #2: lambda requested (descending order) @@ -58,9 +54,9 @@ class CompareTwoNXSDataForSFcalculator(object): resultLessThan = 1 resultMoreThan = -1 - if (_paramNexusToPosition < _paramNexusToCompareWith): + if _paramNexusToPosition < _paramNexusToCompareWith: return resultLessThan - elif (_paramNexusToPosition > _paramNexusToCompareWith): + elif _paramNexusToPosition > _paramNexusToCompareWith: return resultMoreThan else: return 0 @@ -74,7 +70,7 @@ def sorter_function(r1, r2): """ return CompareTwoNXSDataForSFcalculator(r2, r1).result() - + class LRDirectBeamSort(PythonAlgorithm): def category(self): @@ -140,7 +136,7 @@ class LRDirectBeamSort(PythonAlgorithm): def _compute_scaling_factors(self, lr_data_sorted): """ - If we need to compute the scaling factors, group the runs by their wavelength request + If we need to compute the scaling factors, group the runs by their wavelength request @param lr_data_sorted: ordered list of workspaces """ group_list = [] @@ -155,7 +151,7 @@ class LRDirectBeamSort(PythonAlgorithm): if len(current_group)>0: group_list.append(current_group) current_group = [] - + current_group.append(r) # Add in the last group @@ -169,7 +165,6 @@ class LRDirectBeamSort(PythonAlgorithm): for g in group_list: if len(g) == 0: continue - runs = [r.getRunNumber() for r in g] direct_beam_runs = [] peak_ranges = [] -- GitLab