Commit a8bfaf36 authored by Thomas Dowrick's avatar Thomas Dowrick
Browse files

Remove some linter disable statements

parent acf4f85f
Pipeline #1931 canceled with stages
in 27 minutes and 40 seconds
......@@ -12,8 +12,8 @@ from sksurgerydavinci.davinci_xi_auto_cropping import AutoCropBlackBorder
LOGGER = logging.getLogger(__name__)
#pylint: disable= no-member, attribute-defined-outside-init
#pylint: disable=protected-access, no-self-use
#pylin: disable= no-member, attribute-defined-outside-init
#pylin: disable=protected-access, no-self-use
class FakeOverlayOnVideoFeed:
""" Implement empty methods to replicate OverlayOnVideoFeed. """
......@@ -65,6 +65,10 @@ class StereoViewerBase(QtWidgets.QWidget):
def __init__(self):
super().__init__()
self.primary_screen = None
self.all_screens = None
self.num_additional_screens = None
self.UI.screenshot_button.clicked.connect(self.on_screenshot_clicked)
self.UI.record_button.clicked.connect(self.on_record_start_clicked)
self.UI.crop_button.clicked.connect(self.on_crop_clicked)
......@@ -95,8 +99,10 @@ class StereoViewerBase(QtWidgets.QWidget):
:type output_screens: List of ints
"""
screen_controller = ScreenController()
self.primary, self.screens = screen_controller.list_of_screens()
self.num_additional_screens = len(self.screens)
self.primary_screen, self.all_screens = \
screen_controller.list_of_screens()
self.num_additional_screens = len(self.all_screens)
if self.sufficent_displays_for_stereo_view():
self.set_widget_screens(output_screens)
......@@ -115,7 +121,8 @@ class StereoViewerBase(QtWidgets.QWidget):
:param screens_to_use: List of QScreen objects.
"""
ordered_screens = [self.primary, self.screens[0], self.screens[1]]
ordered_screens = \
[self.primary_screen, self.all_screens[0], self.all_screens[1]]
UI_screen = ordered_screens[screens_to_use[0]-1]
left_screen = ordered_screens[screens_to_use[1]-1]
......@@ -129,6 +136,7 @@ class StereoViewerBase(QtWidgets.QWidget):
self.maximize_left_and_right_widgets()
def are_widgets_on_different_screens(self, screens):
#pylint:disable=no-self-use
"""
Check if each widget has been placed on it's own screen.
:param screens: List of screen numbers corresponding to the screen
......
......@@ -24,7 +24,7 @@ def test_button_callbacks_executed(qtbot):
qtbot.mouseClick(mono.UI.record_button, QtCore.Qt.LeftButton)
qtbot.mouseClick(mono.UI.record_button, QtCore.Qt.LeftButton)
# Autocropping
# Autocropping start/stop
qtbot.mouseClick(mono.UI.autocrop_button, QtCore.Qt.LeftButton)
qtbot.mouseClick(mono.UI.autocrop_button, QtCore.Qt.LeftButton)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment