Skip to content
Snippets Groups Projects
Commit 861eee10 authored by Zhou, Wenduo's avatar Zhou, Wenduo
Browse files

Refs #12122. Killed pylint warnings.

parent 173e44c7
No related branches found
No related tags found
No related merge requests found
...@@ -43,12 +43,12 @@ def parse_integer_list(array_str): ...@@ -43,12 +43,12 @@ def parse_integer_list(array_str):
array_str = array_str.replace('\t ', '') array_str = array_str.replace('\t ', '')
int_str_list = array_str.split(',') int_str_list = array_str.split(',')
int_list = list() integer_list = list()
for int_str in int_str_list: for int_str in int_str_list:
try: try:
int_value = int(int_str) int_value = int(int_str)
int_list.append(int_value) integer_list.append(int_value)
except ValueError: except ValueError:
num_dash = int_str.count('-') num_dash = int_str.count('-')
if num_dash == 1: if num_dash == 1:
...@@ -57,35 +57,35 @@ def parse_integer_list(array_str): ...@@ -57,35 +57,35 @@ def parse_integer_list(array_str):
start_value = int(terms[0]) start_value = int(terms[0])
end_value = int(terms[1]) end_value = int(terms[1])
except ValueError: except ValueError:
raise 'Unable to parse %s due to value error' % int_str raise RuntimeError('Unable to parse %s due to value error' % int_str)
elif num_dash == 2 and int_str.startswith('-'): elif num_dash == 2 and int_str.startswith('-'):
terms = int_str[1:].split('-') terms = int_str[1:].split('-')
try: try:
start_value = int(terms[0])*-1 start_value = int(terms[0])*-1
end_value = int(terms[1]) end_value = int(terms[1])
except ValueError: except ValueError:
raise 'Unable to parse %s due to value error' % int_str raise RuntimeError('Unable to parse %s due to value error' % int_str)
elif num_dash == 3: elif num_dash == 3:
terms = int_str.split('-') terms = int_str.split('-')
try: try:
start_value = -1*int(terms[1]) start_value = -1*int(terms[1])
end_value = -1*int(terms[3]) end_value = -1*int(terms[3])
except ValueError: except ValueError:
raise 'Unable to parse %s due to value error' % int_str raise RuntimeError('Unable to parse %s due to value error' % int_str)
except IndexError: except IndexError:
raise 'Unable to parse %s due to value error' % int_str raise RuntimeError('Unable to parse %s due to value error' % int_str)
else: else:
raise 'Unable to parse %s due to value error' % int_str raise RuntimeError('Unable to parse %s due to value error' % int_str)
int_list.extend(xrange(start_value, end_value+1)) integer_list.extend(xrange(start_value, end_value+1))
# END-FOR # END-FOR
return int_list return integer_list
def parse_float_editors(line_edits): def parse_float_editors(line_edits):
""" """
:param line_edit_list: :param line_edits:
:return: (True, list of floats); (False, error message) :return: (True, list of floats); (False, error message)
""" """
# Set flag # Set flag
...@@ -124,7 +124,7 @@ def parse_float_editors(line_edits): ...@@ -124,7 +124,7 @@ def parse_float_editors(line_edits):
def parse_integers_editors(line_edits): def parse_integers_editors(line_edits):
""" """
:param line_edit_list: :param line_edits:
:return: (True, list of integers); (False, error message) :return: (True, list of integers); (False, error message)
""" """
# Set flag # Set flag
......
...@@ -58,7 +58,7 @@ class UBMatrixTable(tableBase.NTableWidget): ...@@ -58,7 +58,7 @@ class UBMatrixTable(tableBase.NTableWidget):
def _set_to_table(self): def _set_to_table(self):
""" """
TODO/DOC Set values in holder '_matrix' to TableWidget
:return: :return:
""" """
for i_row in xrange(3): for i_row in xrange(3):
...@@ -77,7 +77,7 @@ class UBMatrixTable(tableBase.NTableWidget): ...@@ -77,7 +77,7 @@ class UBMatrixTable(tableBase.NTableWidget):
def set_from_list(self, element_array): def set_from_list(self, element_array):
""" """
TODO/DOC Set table value including holder and QTable from a 1D numpy array
:param element_array: :param element_array:
:return: :return:
""" """
...@@ -99,7 +99,7 @@ class UBMatrixTable(tableBase.NTableWidget): ...@@ -99,7 +99,7 @@ class UBMatrixTable(tableBase.NTableWidget):
def set_from_matrix(self, matrix): def set_from_matrix(self, matrix):
""" """
TODO - DOC Set value to both holder and QTable from a numpy 3 x 3 matrix
:param matrix: :param matrix:
:return: :return:
""" """
...@@ -311,7 +311,7 @@ class ProcessTableWidget(tableBase.NTableWidget): ...@@ -311,7 +311,7 @@ class ProcessTableWidget(tableBase.NTableWidget):
def set_status(self, scan_no, status): def set_status(self, scan_no, status):
""" """
TODO/Doc Set the status for merging scan to QTable
:param status: :param status:
:return: :return:
""" """
...@@ -335,7 +335,7 @@ class ProcessTableWidget(tableBase.NTableWidget): ...@@ -335,7 +335,7 @@ class ProcessTableWidget(tableBase.NTableWidget):
def set_ws_names(self, scan_num, merged_md_name, ws_group_name): def set_ws_names(self, scan_num, merged_md_name, ws_group_name):
""" """
TODO/DOC Set the output workspace and workspace group's names to QTable
:param merged_md_name: :param merged_md_name:
:param ws_group_name: :param ws_group_name:
:return: :return:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment