Skip to content

Commit

Permalink
blackened code
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed May 13, 2019
1 parent 6278efe commit d6a8ef0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion iris/gui/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(self, *args, **kwargs):
# mirrored in the error log
self.status_message_signal.connect(self.logger.info)
self.error_message_signal.connect(self.logger.error)

@QtCore.pyqtSlot(str)
@QtCore.pyqtSlot(str, object)
def log(self, message, level=logging.INFO):
Expand Down
12 changes: 6 additions & 6 deletions iris/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,10 @@ def __init__(self, *args, **kwargs):
# Note: the update status signal is passed to the controller
# so it can be logged as well.
self.update_checker = UpdateChecker(parent=self)
self.update_checker.update_status_signal.connect(self.controller.status_message_signal)
self.update_checker.update_available_signal.connect(
self.update_available
self.update_checker.update_status_signal.connect(
self.controller.status_message_signal
)
self.update_checker.update_available_signal.connect(self.update_available)
self.update_checker.start()

def _create_load_raw(self, cls, submenu):
Expand Down Expand Up @@ -638,16 +638,16 @@ def launch_calq_dialog(self):
dialog.calibration_parameters.connect(self.controller.powder_calq)
dialog.exec_()
dialog.calibration_parameters.disconnect(self.controller.powder_calq)

@QtCore.pyqtSlot(bool)
def update_available(self, available):
""" Handle UI in case an update is available or not. """
if available:
self.update_action.setEnabled(True)
self.update_action.setText('An update is available!')
self.update_action.setText("An update is available!")
else:
self.update_action.setEnabled(False)
self.update_action.setText('No updates available.')
self.update_action.setText("No updates available.")

@QtCore.pyqtSlot(object)
def load_raw_dataset(self, cls):
Expand Down
2 changes: 1 addition & 1 deletion iris/gui/qlogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, *args, **kwargs):

self.logger.addHandler(self.file_handler)
self.logger.addHandler(self.stream_handler)

def log(self, msg, level):
""" General method for logging. Ideal for dynamic logging levels. """
self.logger.log(level, msg)
Expand Down

0 comments on commit d6a8ef0

Please sign in to comment.