Skip to content

Commit

Permalink
Fixed flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed May 8, 2019
1 parent 9975314 commit 7a99e93
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 32 deletions.
2 changes: 1 addition & 1 deletion addie/calculate_gr/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 0 additions & 7 deletions addie/calculate_gr/gofrtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions addie/calculate_gr/save_sq_dialog_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))


Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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=[]):
Expand Down
2 changes: 1 addition & 1 deletion addie/rietveld/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions addie/utilities/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7a99e93

Please sign in to comment.