diff --git a/addie/calculate_gr/event_handler.py b/addie/calculate_gr/event_handler.py index 97fc7367..fc19e0b3 100644 --- a/addie/calculate_gr/event_handler.py +++ b/addie/calculate_gr/event_handler.py @@ -21,7 +21,7 @@ def check_widgets_status(main_window, enable_gr_widgets=False): sofq_widgets_status(main_window, sofq_status) gr_widgets_status(main_window, gr_status) - _tree_ui = main_window.calculategr_ui.frame_treeWidget_grWsList.children()[1] + #_tree_ui = main_window.calculategr_ui.frame_treeWidget_grWsList.children()[1] def sofq_widgets_status(main_window, sofq_status): diff --git a/addie/calculate_gr/gofrtree.py b/addie/calculate_gr/gofrtree.py index f19968ab..e46e526e 100644 --- a/addie/calculate_gr/gofrtree.py +++ b/addie/calculate_gr/gofrtree.py @@ -609,13 +609,6 @@ def check_widgets_status(self): is_sofq_empty = self.is_sofq_empty() sofq_widgets_status(self.parent, not is_sofq_empty) - - - - - - - def _delete_main_node(self, node_item): """ Delete a main node diff --git a/addie/calculate_gr/save_sq_dialog_message.py b/addie/calculate_gr/save_sq_dialog_message.py index c645f60f..5f7859f8 100644 --- a/addie/calculate_gr/save_sq_dialog_message.py +++ b/addie/calculate_gr/save_sq_dialog_message.py @@ -15,5 +15,3 @@ def __init__(self, main_window=None): def init_widgets(self): self.ui.message_label.setPixmap(QtGui.QPixmap(":/preview/save_sq_selection_image.png")) - - diff --git a/addie/processing/mantid/master_table/align_and_focus_args.py b/addie/processing/mantid/master_table/align_and_focus_args.py index 74c311d4..c96ba1e0 100644 --- a/addie/processing/mantid/master_table/align_and_focus_args.py +++ b/addie/processing/mantid/master_table/align_and_focus_args.py @@ -1,5 +1,4 @@ from __future__ import (absolute_import, division, print_function) -from collections import OrderedDict import numpy as np from qtpy.QtWidgets import QMainWindow, QTableWidgetItem from qtpy import QtCore, QtGui diff --git a/addie/processing/mantid/master_table/reduction_configuration_handler.py b/addie/processing/mantid/master_table/reduction_configuration_handler.py index 653035e2..f1b32b6e 100644 --- a/addie/processing/mantid/master_table/reduction_configuration_handler.py +++ b/addie/processing/mantid/master_table/reduction_configuration_handler.py @@ -89,18 +89,6 @@ def init_global_key_value_widgets(self): self._set_column_widths() self.init_table() - def populate_list_algo(self): - self.ui.list_key_comboBox.clear() - return - - raw_list_algo = get_list_algo('AlignAndFocusPowderFromFiles') - list_algo_without_blacklist = self._remove_blacklist_algo(raw_list_algo) - - global_list_keys = self.parent.global_key_value.keys() - global_unused_list_algo = self.remove_from_list(original_list=list_algo_without_blacklist, - to_remove=global_list_keys) - self.ui.list_key_comboBox.addItems(global_unused_list_algo) - def _remove_blacklist_algo(self, list_algo): list_algo_without_blacklist = [] for _algo in list_algo: @@ -121,14 +109,6 @@ def init_table(self): def show_global_key_value_widgets(self, visible=False): self.ui.global_key_value_groupBox.setVisible(visible) - def _remove_blacklist_algo(self, list_algo): - list_algo_without_blacklist = [] - for _algo in list_algo: - if not (_algo in self.parent.align_and_focus_powder_from_files_blacklist): - list_algo_without_blacklist.append(_algo) - - return list_algo_without_blacklist - def remove_from_list(self, original_list=[], to_remove=[]): diff --git a/addie/rietveld/event_handler.py b/addie/rietveld/event_handler.py index 730105d3..6dc8e939 100644 --- a/addie/rietveld/event_handler.py +++ b/addie/rietveld/event_handler.py @@ -104,7 +104,7 @@ def do_load_bragg_file(main_window): print('Encountered exception') print(e) - except ValueError as e: + except ValueError: main_window.setStyleSheet("QStatusBar{padding-left:8px;color:red;font-weight:bold;}") main_window.ui.statusbar.showMessage("Error loading {}".format(bragg_file_names), main_window.statusbar_display_time) diff --git a/addie/utilities/general.py b/addie/utilities/general.py index 7cc47b9e..0345ae93 100644 --- a/addie/utilities/general.py +++ b/addie/utilities/general.py @@ -30,6 +30,7 @@ def json_extractor(json=None, list_args=[]): except KeyError: return "N/A" + def get_list_algo(algo_name): _alg = mantid.AlgorithmManager.createUnmanaged(algo_name) _alg.initialize()