From 409c2a7ca2f84aed092f5d713a62e4864394efa1 Mon Sep 17 00:00:00 2001 From: Brian Cipriano Date: Sat, 31 Jul 2021 18:58:02 -0400 Subject: [PATCH] Upgrade gRPC and PySide Python dependencies. (#1003) --- VERSION.in | 2 +- ci/pylintrc_main | 3 +- cuegui/cuegui/AbstractDialog.py | 2 ++ cuegui/cuegui/AbstractTreeWidget.py | 8 ++--- cuegui/cuegui/Action.py | 2 +- cuegui/cuegui/Comments.py | 4 +++ cuegui/cuegui/ConfirmationDialog.py | 2 ++ cuegui/cuegui/CreateShowDialog.py | 2 ++ cuegui/cuegui/CreatorDialog.py | 2 ++ cuegui/cuegui/CueJobMonitorTree.py | 2 +- cuegui/cuegui/CueStateBarWidget.py | 2 +- cuegui/cuegui/DependWizard.py | 2 +- cuegui/cuegui/EmailDialog.py | 4 +++ cuegui/cuegui/FilterDialog.py | 30 +++++++++-------- cuegui/cuegui/FrameMonitor.py | 14 ++++---- cuegui/cuegui/FrameMonitorTree.py | 4 +-- cuegui/cuegui/GarbageCollector.py | 2 +- cuegui/cuegui/GroupDialog.py | 4 +++ cuegui/cuegui/HostMonitor.py | 6 ++-- cuegui/cuegui/HostMonitorTree.py | 2 ++ cuegui/cuegui/JobMonitorTree.py | 2 ++ cuegui/cuegui/LayerDialog.py | 6 +++- cuegui/cuegui/LimitsWidget.py | 4 ++- cuegui/cuegui/LocalBooking.py | 8 +++-- cuegui/cuegui/Main.py | 17 +++++----- cuegui/cuegui/MainWindow.py | 20 ++++++------ cuegui/cuegui/MenuActions.py | 2 +- cuegui/cuegui/ProcMonitor.py | 26 ++++++--------- cuegui/cuegui/ProcMonitorTree.py | 2 +- cuegui/cuegui/ProgressDialog.py | 2 +- cuegui/cuegui/Redirect.py | 8 +++-- cuegui/cuegui/ServiceDialog.py | 4 ++- cuegui/cuegui/ShowDialog.py | 12 ++++--- cuegui/cuegui/ShowsWidget.py | 2 +- cuegui/cuegui/SubscriptionGraphWidget.py | 8 ++--- cuegui/cuegui/SubscriptionsWidget.py | 2 +- cuegui/cuegui/TagsWidget.py | 2 +- cuegui/cuegui/TasksDialog.py | 2 ++ cuegui/cuegui/TextEditDialog.py | 2 ++ cuegui/cuegui/UnbookDialog.py | 6 +++- cuegui/cuegui/images/crystal/icons_rcc.py | 2 ++ cuegui/cuegui/images/icons_rcc.py | 2 ++ cuegui/cuegui/plugins/AttributesPlugin.py | 2 +- cuegui/cuegui/plugins/LogViewPlugin.py | 32 +++++++++++-------- cuegui/cuegui/plugins/MonitorCuePlugin.py | 28 ++++++++-------- .../cuegui/plugins/MonitorJobDetailsPlugin.py | 2 +- cuegui/cuegui/plugins/MonitorJobsPlugin.py | 28 ++++++++-------- cuegui/cuegui/plugins/ShowsPlugin.py | 2 +- cuegui/tests/test_utils.py | 3 ++ cuesubmit/cuesubmit/__main__.py | 2 ++ cuesubmit/cuesubmit/ui/Command.py | 2 +- cuesubmit/cuesubmit/ui/Job.py | 2 ++ cuesubmit/cuesubmit/ui/SettingsWidgets.py | 6 ++-- cuesubmit/cuesubmit/ui/Submit.py | 4 +++ cuesubmit/cuesubmit/ui/Widgets.py | 10 ++++-- proto/README.md | 6 ++++ requirements.txt | 6 ++-- requirements_gui.txt | 2 +- 58 files changed, 227 insertions(+), 150 deletions(-) diff --git a/VERSION.in b/VERSION.in index f3040840f..948a54727 100644 --- a/VERSION.in +++ b/VERSION.in @@ -1 +1 @@ -0.13 +0.14 diff --git a/ci/pylintrc_main b/ci/pylintrc_main index b4510f658..85edaf4b4 100644 --- a/ci/pylintrc_main +++ b/ci/pylintrc_main @@ -60,7 +60,8 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". -disable=duplicate-code, +disable=c-extension-no-member, + duplicate-code, fixme, invalid-name, locally-disabled, diff --git a/cuegui/cuegui/AbstractDialog.py b/cuegui/cuegui/AbstractDialog.py index 613b3d83c..f6d701fe4 100644 --- a/cuegui/cuegui/AbstractDialog.py +++ b/cuegui/cuegui/AbstractDialog.py @@ -37,8 +37,10 @@ def _newCheckBoxSelectionMatrix(title, allowedOptions, checkedOptions, parent=No def _newDialogButtonBox(self, buttons, orientation=QtCore.Qt.Horizontal): buttonBox = QtWidgets.QDialogButtonBox(buttons, orientation, self) + # pylint: disable=no-member buttonBox.accepted.connect(self.accept) buttonBox.rejected.connect(self.reject) + # pylint: enable=no-member return buttonBox def _addWidgetRow(self, *widgets): diff --git a/cuegui/cuegui/AbstractTreeWidget.py b/cuegui/cuegui/AbstractTreeWidget.py index cf74590ef..96250453e 100644 --- a/cuegui/cuegui/AbstractTreeWidget.py +++ b/cuegui/cuegui/AbstractTreeWidget.py @@ -100,10 +100,10 @@ def __init__(self, parent): self.__setupColumnMenu() + # pylint: disable=no-member self.itemClicked.connect(self.__itemSingleClickedEmitToApp) self.itemDoubleClicked.connect(self.__itemDoubleClickedEmitToApp) self._timer.timeout.connect(self.updateRequest) - # pylint: disable=no-member QtGui.qApp.request_update.connect(self.updateRequest) # pylint: enable=no-member @@ -215,7 +215,7 @@ def startTicksUpdate(self, updateInterval, self.ticksLock = QtCore.QMutex() self.__ticksTimer = QtCore.QTimer(self) - self.__ticksTimer.timeout.connect(self.__tick) + self.__ticksTimer.timeout.connect(self.__tick) # pylint: disable=no-member self.__ticksTimer.start(1000) self.ticksWithoutUpdate = 999 @@ -509,7 +509,7 @@ def __setupColumnMenu(self): self.__dropdown.setFixedHeight(self.header().height() - 10) self.__dropdown.setToolTip("Click to select columns to display") self.__dropdown.setIcon(QtGui.QIcon(":column_popdown.png")) - self.__dropdown.clicked.connect(self.__displayColumnMenu) + self.__dropdown.clicked.connect(self.__displayColumnMenu) # pylint: disable=no-member layout = QtWidgets.QHBoxLayout(self.header()) layout.setContentsMargins(0, 0, 0, 0) @@ -521,7 +521,7 @@ def __displayColumnMenu(self): self.__dropdown.height())) menu = QtWidgets.QMenu(self) - menu.triggered.connect(self.__handleColumnMenu) + menu.triggered.connect(self.__handleColumnMenu) # pylint: disable=no-member for col in range(self.columnCount()): if self.columnWidth(col) or self.isColumnHidden(col): name = self.__columnInfoByType[self.__columnPrimaryType][col][COLUMN_NAME] diff --git a/cuegui/cuegui/Action.py b/cuegui/cuegui/Action.py index 853e6a087..f9a083e09 100644 --- a/cuegui/cuegui/Action.py +++ b/cuegui/cuegui/Action.py @@ -103,4 +103,4 @@ def __init__(self,callback=None, parent=None): self.setText("Refresh") self.setIcon(QtGui.QIcon(":/images/stock-refresh.png")) if callback: - self.triggered.connect(callback) + self.triggered.connect(callback) # pylint: disable=no-member diff --git a/cuegui/cuegui/Comments.py b/cuegui/cuegui/Comments.py index 9d8452a5b..c24a9802e 100644 --- a/cuegui/cuegui/Comments.py +++ b/cuegui/cuegui/Comments.py @@ -94,6 +94,7 @@ def __init__(self, source, parent=None): btnLayout.addWidget(self.__btnClose) layout.addLayout(btnLayout) + # pylint: disable=no-member self.__treeSubjects.itemSelectionChanged.connect(self.__itemChanged) self.__comboMacro.currentTextChanged.connect(self.__macroHandle) self.__btnSave.pressed.connect(self.__saveComment) @@ -102,6 +103,7 @@ def __init__(self, source, parent=None): self.__btnClose.pressed.connect(self.__close) self.__textSubject.textEdited.connect(self.__textEdited) self.__textMessage.textChanged.connect(self.__textEdited) + # pylint: enable=no-member self.refreshComments() self.__macroLoad() @@ -333,8 +335,10 @@ def __init__(self, name="", subject="", message="", parent=None): layout.addWidget(self.__textMessage) layout.addLayout(btnLayout) + # pylint: disable=no-member self.__btnSave.pressed.connect(self.__save) self.__btnCancel.pressed.connect(self.reject) + # pylint: enable=no-member def __save(self): """Validates and then exits from the dialog in success""" diff --git a/cuegui/cuegui/ConfirmationDialog.py b/cuegui/cuegui/ConfirmationDialog.py index 0c71e88e3..68f0f7acd 100644 --- a/cuegui/cuegui/ConfirmationDialog.py +++ b/cuegui/cuegui/ConfirmationDialog.py @@ -74,5 +74,7 @@ def __init__(self, title, text, items=[], parent=None): self.setMaximumSize(400,300) self.setWindowTitle(title) + # pylint: disable=no-member __btn_accept.clicked.connect(self.accept) __btn_cancel.clicked.connect(self.reject) + # pylint: enable=no-member diff --git a/cuegui/cuegui/CreateShowDialog.py b/cuegui/cuegui/CreateShowDialog.py index 8bb733151..148bd52d2 100644 --- a/cuegui/cuegui/CreateShowDialog.py +++ b/cuegui/cuegui/CreateShowDialog.py @@ -65,8 +65,10 @@ def __init__(self, parent=None): self.layout().addWidget(self.__create_btn, 5, 1) self.layout().addWidget(self.__cancel_btn, 5, 2) + # pylint: disable=no-member self.__create_btn.clicked.connect(self.__createShow) self.__cancel_btn.clicked.connect(self.__cancelDialog) + # pylint: enable=no-member self.adjustSize() def __createSubscriptionWidget(self): diff --git a/cuegui/cuegui/CreatorDialog.py b/cuegui/cuegui/CreatorDialog.py index 0e436b201..a28d2f00b 100644 --- a/cuegui/cuegui/CreatorDialog.py +++ b/cuegui/cuegui/CreatorDialog.py @@ -97,8 +97,10 @@ def __init__(self, show=None, parent=None): layout.addWidget(self.__buttons) self.resize(400, 0) + # pylint: disable=no-member self.__buttons.accepted.connect(self.create) self.__buttons.rejected.connect(self.close) + # pylint: enable=no-member def create(self): self.__creator.create() diff --git a/cuegui/cuegui/CueJobMonitorTree.py b/cuegui/cuegui/CueJobMonitorTree.py index 3c8fe9633..97d22cb39 100644 --- a/cuegui/cuegui/CueJobMonitorTree.py +++ b/cuegui/cuegui/CueJobMonitorTree.py @@ -222,9 +222,9 @@ def __init__(self, parent): # pylint: disable=no-member QtGui.qApp.facility_changed.connect(self.removeAllShows) - # pylint: enable=no-member self.itemClicked.connect(self.__itemSingleClickedCopy) self.itemClicked.connect(self.__itemSingleClickedComment) + # pylint: enable=no-member # Skip updates if the user is scrolling self._limitUpdatesDuringScrollSetup() diff --git a/cuegui/cuegui/CueStateBarWidget.py b/cuegui/cuegui/CueStateBarWidget.py index 3bf8be62d..780ea319d 100644 --- a/cuegui/cuegui/CueStateBarWidget.py +++ b/cuegui/cuegui/CueStateBarWidget.py @@ -62,7 +62,7 @@ def __init__(self, sourceTree, parent=None): self.__timer = QtCore.QTimer(self) self.__lastUpdate = 0 - self.__timer.timeout.connect(self.updateColors) + self.__timer.timeout.connect(self.updateColors) # pylint: disable=no-member self.__sourceTree.verticalScrollBar().valueChanged.connect(self.update) self.__sourceTree.verticalScrollBar().rangeChanged.connect(self.__updateColors) diff --git a/cuegui/cuegui/DependWizard.py b/cuegui/cuegui/DependWizard.py index 6910ee685..f328f76d7 100644 --- a/cuegui/cuegui/DependWizard.py +++ b/cuegui/cuegui/DependWizard.py @@ -521,7 +521,7 @@ def __init__(self, parent): self._addLabel("Depend on Job:", 0, 0) self.__jobFilterLineEdit = self._addLineEdit(2, 0, "") - self.__jobFilterLineEdit.textChanged.connect(self.filterJobs) + self.__jobFilterLineEdit.textChanged.connect(self.filterJobs) # pylint: disable=no-member self.__jobList = self._addListWidget(3, 0) diff --git a/cuegui/cuegui/EmailDialog.py b/cuegui/cuegui/EmailDialog.py index 671aeff28..f4f83387e 100644 --- a/cuegui/cuegui/EmailDialog.py +++ b/cuegui/cuegui/EmailDialog.py @@ -130,8 +130,10 @@ def __init__(self, job, frames, parent=None): ly.addWidget(self.__txt_find) ly.addWidget(self.__txt_log) + # pylint: disable=no-member self.__sel_frames.activated.connect(self.switchLogEvent) self.__txt_find.returnPressed.connect(self.findEvent) + # pylint: enable=no-member # pylint: disable=inconsistent-return-statements def __getFrame(self, name): @@ -247,8 +249,10 @@ def __init__(self, job, parent=None): hlayout.addWidget(self.__btnCancel) vlayout.addLayout(hlayout) + # pylint: disable=no-member self.__btnSend.clicked.connect(self.sendEmail) self.__btnCancel.clicked.connect(self.cancel.emit) + # pylint: enable=no-member def giveFocus(self): """Initializes widget state when the widget gains focus.""" diff --git a/cuegui/cuegui/FilterDialog.py b/cuegui/cuegui/FilterDialog.py index f130eb77e..73b4153da 100644 --- a/cuegui/cuegui/FilterDialog.py +++ b/cuegui/cuegui/FilterDialog.py @@ -110,6 +110,7 @@ def __init__(self, show, parent=None): glayout.addWidget(self.__btnAddAction, 7, 7, 1, 1) glayout.addWidget(self.__btnDone, 8, 7, 1, 1) + # pylint: disable=no-member self.__filters.itemClicked.connect(self.__itemSingleClicked) self.__btnRefresh.clicked.connect(self.__refresh) self.__btnAddFilter.clicked.connect(self.__createFilter) @@ -120,6 +121,7 @@ def __init__(self, show, parent=None): self.__btnDeleteAllActions.clicked.connect(self.__actions.deleteAllActions) self.__btnAddAction.clicked.connect(self.__actions.createAction) self.__btnDone.clicked.connect(self.accept) + # pylint: enable=no-member def __createFilter(self): """Prompts the user to create a new filter""" @@ -584,13 +586,13 @@ def updateWidgets(self): combo = QtWidgets.QCheckBox(self.parent()) combo.setFocusPolicy(QtCore.Qt.NoFocus) self.treeWidget().setItemWidget(self, 1, combo) - combo.stateChanged.connect(self.setEnabled) + combo.stateChanged.connect(self.setEnabled) # pylint: disable=no-member self.__widgets["enabled"] = combo combo = NoWheelComboBox(self.parent()) combo.addItems(FILTERTYPE) self.treeWidget().setItemWidget(self, 3, combo) - combo.currentIndexChanged.connect(self.setType) + combo.currentIndexChanged.connect(self.setType) # pylint: disable=no-member self.__widgets["type"] = combo self.__widgets["type"].setCurrentIndex(self.rpcObject.type()) @@ -653,23 +655,23 @@ def updateWidgets(self): combo = NoWheelComboBox(parent) combo.addItems(MATCHSUBJECT) treeWidget.setItemWidget(self, 0, combo) - combo.currentIndexChanged.connect(self.setSubject) + combo.currentIndexChanged.connect(self.setSubject) # pylint: disable=no-member self.__widgets["subject"] = combo combo = NoWheelComboBox(parent) combo.addItems(MATCHTYPE) treeWidget.setItemWidget(self, 1, combo) - combo.currentIndexChanged.connect(self.setType) + combo.currentIndexChanged.connect(self.setType) # pylint: disable=no-member self.__widgets["type"] = combo edit = QtWidgets.QLineEdit("", parent) treeWidget.setItemWidget(self, 2, edit) - edit.editingFinished.connect(self.setInput) + edit.editingFinished.connect(self.setInput) # pylint: disable=no-member self.__widgets["input"] = edit btn = QtWidgets.QPushButton(QtGui.QIcon(":kill.png"), "", parent) treeWidget.setItemWidget(self, 3, btn) - btn.clicked.connect(self.delete) + btn.clicked.connect(self.delete) # pylint: disable=no-member self.__widgets["delete"] = btn self.__widgets["subject"].setCurrentIndex(self.rpcObject.subject()) @@ -755,12 +757,12 @@ def updateWidgets(self): if self.rpcObject.type() in (opencue.api.filter_pb2.PAUSE_JOB,): widget = NoWheelComboBox(self.parent()) widget.addItems(PAUSETYPE) - widget.currentIndexChanged.connect(self.__setValue) + widget.currentIndexChanged.connect(self.__setValue) # pylint: disable=no-member elif self.rpcObject.type() in (opencue.api.filter_pb2.SET_JOB_PRIORITY,): widget = NoWheelSpinBox(self.parent()) widget.setMaximum(99999) - widget.editingFinished.connect(self.__setValue) + widget.editingFinished.connect(self.__setValue) # pylint: disable=no-member elif self.rpcObject.type() in (opencue.api.filter_pb2.SET_ALL_RENDER_LAYER_MEMORY, opencue.api.filter_pb2.SET_ALL_RENDER_LAYER_CORES): @@ -768,7 +770,7 @@ def updateWidgets(self): widget.setDecimals(2) widget.setSingleStep(.10) widget.setMaximum(MAX_RENDER_MEM) - widget.editingFinished.connect(self.__setValue) + widget.editingFinished.connect(self.__setValue) # pylint: disable=no-member elif self.rpcObject.type() in (opencue.api.filter_pb2.SET_JOB_MAX_CORES, opencue.api.filter_pb2.SET_JOB_MIN_CORES): @@ -776,21 +778,21 @@ def updateWidgets(self): widget.setDecimals(0) widget.setSingleStep(1) widget.setMaximum(1000) - widget.editingFinished.connect(self.__setValue) + widget.editingFinished.connect(self.__setValue) # pylint: disable=no-member elif self.rpcObject.type() in (opencue.api.filter_pb2.SET_ALL_RENDER_LAYER_TAGS,): widget = QtWidgets.QLineEdit("", self.parent()) - widget.editingFinished.connect(self.__setValue) + widget.editingFinished.connect(self.__setValue) # pylint: disable=no-member elif self.rpcObject.type() in (opencue.api.filter_pb2.MOVE_JOB_TO_GROUP,): widget = NoWheelComboBox(self.parent()) widget.addItems(list(self.treeWidget().groupNames.keys())) - widget.currentIndexChanged.connect(self.__setValue) + widget.currentIndexChanged.connect(self.__setValue) # pylint: disable=no-member elif self.rpcObject.type() in (opencue.api.filter_pb2.SET_MEMORY_OPTIMIZER,): widget = NoWheelComboBox(self.parent()) widget.addItems(MEMOPTTYPE) - widget.currentIndexChanged.connect(self.__setValue) + widget.currentIndexChanged.connect(self.__setValue) # pylint: disable=no-member if widget: self.treeWidget().setItemWidget(self, 1, widget) @@ -798,7 +800,7 @@ def updateWidgets(self): btn = QtWidgets.QPushButton(QtGui.QIcon(":kill.png"), "", self.parent()) self.treeWidget().setItemWidget(self, 2, btn) - btn.clicked.connect(self.delete) + btn.clicked.connect(self.delete) # pylint: disable=no-member self.__widgets["delete"] = btn # Update the widget with the current value diff --git a/cuegui/cuegui/FrameMonitor.py b/cuegui/cuegui/FrameMonitor.py index fc83fe1a4..caae78efd 100644 --- a/cuegui/cuegui/FrameMonitor.py +++ b/cuegui/cuegui/FrameMonitor.py @@ -168,7 +168,7 @@ def _refreshButtonSetup(self, layout): self.btn_refresh = QtWidgets.QPushButton("Refresh") self.btn_refresh.setFocusPolicy(QtCore.Qt.NoFocus) layout.addWidget(self.btn_refresh) - self.btn_refresh.clicked.connect(self.frameMonitorTree.updateRequest) + self.btn_refresh.clicked.connect(self.frameMonitorTree.updateRequest) # pylint: disable=no-member self.frameMonitorTree.updated.connect(self._refreshButtonDisableHandle) def _refreshButtonEnableHandle(self): @@ -191,7 +191,7 @@ def _clearButtonSetup(self, layout): btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setContentsMargins(0,0,0,0) layout.addWidget(btn) - btn.clicked.connect(self._clearButtonHandle) + btn.clicked.connect(self._clearButtonHandle) # pylint: disable=no-member def _clearButtonHandle(self): """Called when the clear button is clicked""" @@ -213,14 +213,14 @@ def _pageButtonSetup(self, layout): self.prev_page_btn.setFocusPolicy(QtCore.Qt.NoFocus) self.prev_page_btn.setContentsMargins(0, 0, 0, 0) layout.addWidget(self.prev_page_btn) - self.prev_page_btn.clicked.connect(lambda: self._pageButtonsHandle(-1)) + self.prev_page_btn.clicked.connect(lambda: self._pageButtonsHandle(-1)) # pylint: disable=no-member # Next page button self.next_page_btn = QtWidgets.QPushButton(">") self.next_page_btn.setFocusPolicy(QtCore.Qt.NoFocus) self.next_page_btn.setContentsMargins(0, 0, 0, 0) layout.addWidget(self.next_page_btn) - self.next_page_btn.clicked.connect(lambda: self._pageButtonsHandle(1)) + self.next_page_btn.clicked.connect(lambda: self._pageButtonsHandle(1)) # pylint: disable=no-member self.frameMonitorTree.job_changed.connect(self._updatePageButtonState) # Page number label @@ -299,7 +299,7 @@ def _selectStatusSetup(self, layout): menu = QtWidgets.QMenu(self) btn.setMenu(menu) - menu.triggered.connect(self._selectStatusHandle) + menu.triggered.connect(self._selectStatusHandle) # pylint: disable=no-member for item in ["Clear", None, "Succeeded", "Running", "Waiting", "Depend", "Dead", "Eaten"]: if item: @@ -347,7 +347,7 @@ def _filterLayersUpdate(self): else: menu = QtWidgets.QMenu(self) btn.setMenu(menu) - menu.triggered[QtWidgets.QAction].connect(self._filterLayersHandle) + menu.triggered[QtWidgets.QAction].connect(self._filterLayersHandle) # pylint: disable=unsubscriptable-object if self.frameMonitorTree.getJob(): layers = [x.data.name for x in self.frameMonitorTree.getJob().getLayers()] @@ -425,7 +425,7 @@ def _filterStatusSetup(self, layout): menu = QtWidgets.QMenu(self) btn.setMenu(menu) - menu.triggered.connect(self._filterStatusHandle) + menu.triggered.connect(self._filterStatusHandle) # pylint: disable=no-member for item in [("Clear", QtCore.Qt.ALT + QtCore.Qt.Key_QuoteLeft), None, diff --git a/cuegui/cuegui/FrameMonitorTree.py b/cuegui/cuegui/FrameMonitorTree.py index 41df65209..cfda922ec 100644 --- a/cuegui/cuegui/FrameMonitorTree.py +++ b/cuegui/cuegui/FrameMonitorTree.py @@ -216,8 +216,8 @@ def __init__(self, parent): self.ticksWithoutUpdate = 999 self.__lastUpdateTime = None - self.itemClicked.connect(self.__itemSingleClickedCopy) - self.itemClicked.connect(self.__itemSingleClickedViewLog) + self.itemClicked.connect(self.__itemSingleClickedCopy) # pylint: disable=no-member + self.itemClicked.connect(self.__itemSingleClickedViewLog) # pylint: disable=no-member self.itemDoubleClicked.connect(self.__itemDoubleClickedViewLog) self.header().sortIndicatorChanged.connect(self.__sortByColumnSave) diff --git a/cuegui/cuegui/GarbageCollector.py b/cuegui/cuegui/GarbageCollector.py index ec0587dbd..83cc06bc7 100644 --- a/cuegui/cuegui/GarbageCollector.py +++ b/cuegui/cuegui/GarbageCollector.py @@ -41,7 +41,7 @@ def __init__(self, parent, debug=False): self.debug = debug self.timer = QtCore.QTimer(self) - self.timer.timeout.connect(self.check) + self.timer.timeout.connect(self.check) # pylint: disable=no-member self.threshold = gc.get_threshold() gc.disable() diff --git a/cuegui/cuegui/GroupDialog.py b/cuegui/cuegui/GroupDialog.py index 2a38d906a..0f949b2f7 100644 --- a/cuegui/cuegui/GroupDialog.py +++ b/cuegui/cuegui/GroupDialog.py @@ -140,15 +140,19 @@ def __createToggleInput(self, text, row, inputWidget, startEnabled): self.layout().addWidget(check, row, 0) self.layout().addWidget(label, row, 1) self.layout().addWidget(inputWidget, row, 2) + # pylint: disable=no-member check.stateChanged.connect(inputWidget.setEnabled) check.stateChanged.connect(label.setEnabled) + # pylint: enable=no-member return (check, inputWidget) def __createButtons(self, buttons, row, width): self.__buttons = QtWidgets.QDialogButtonBox(buttons, QtCore.Qt.Horizontal, self) self.layout().addWidget(self.__buttons, row, 1, 1, width) + # pylint: disable=no-member self.__buttons.accepted.connect(self.accept) self.__buttons.rejected.connect(self.reject) + # pylint: enable=no-member def accept(self): __name = str(self._nameValue.text()) diff --git a/cuegui/cuegui/HostMonitor.py b/cuegui/cuegui/HostMonitor.py index 0c467d004..ad6c16a5e 100644 --- a/cuegui/cuegui/HostMonitor.py +++ b/cuegui/cuegui/HostMonitor.py @@ -108,7 +108,7 @@ def __filterByHostNameSetup(self, layout): self.__filterByHostNameLastInput = None - self.__filterByHostName.editingFinished.connect(self.__filterByHostNameHandle) + self.__filterByHostName.editingFinished.connect(self.__filterByHostNameHandle) # pylint: disable=no-member btn = QtWidgets.QPushButton("Clr") btn.setMaximumHeight(FILTER_HEIGHT) @@ -294,7 +294,7 @@ def __refreshButtonSetup(self, layout): self.btn_refresh.setMaximumHeight(FILTER_HEIGHT) self.btn_refresh.setFocusPolicy(QtCore.Qt.NoFocus) layout.addWidget(self.btn_refresh) - self.btn_refresh.clicked.connect(self.hostMonitorTree.updateRequest) + self.btn_refresh.clicked.connect(self.hostMonitorTree.updateRequest) # pylint: disable=no-member self.hostMonitorTree.updated.connect(self.__refreshButtonDisableHandle) def __refreshButtonEnableHandle(self): @@ -318,7 +318,7 @@ def __clearButtonSetup(self, layout): btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setContentsMargins(0,0,0,0) layout.addWidget(btn) - btn.clicked.connect(self.__clearButtonHandle) + btn.clicked.connect(self.__clearButtonHandle) # pylint: disable=no-member def __clearButtonHandle(self): """Called when the clear button is clicked""" diff --git a/cuegui/cuegui/HostMonitorTree.py b/cuegui/cuegui/HostMonitorTree.py index 3574b4c71..06143769d 100644 --- a/cuegui/cuegui/HostMonitorTree.py +++ b/cuegui/cuegui/HostMonitorTree.py @@ -163,8 +163,10 @@ def __init__(self, parent): self.setDropIndicatorShown(True) self.setDragEnabled(True) + # pylint: disable=no-member self.itemClicked.connect(self.__itemSingleClickedCopy) self.itemClicked.connect(self.__itemSingleClickedComment) + # pylint: enable=no-member # Don't use the standard space bar to refresh # pylint: disable=no-member diff --git a/cuegui/cuegui/JobMonitorTree.py b/cuegui/cuegui/JobMonitorTree.py index 2e4698e5d..2f2a6c63d 100644 --- a/cuegui/cuegui/JobMonitorTree.py +++ b/cuegui/cuegui/JobMonitorTree.py @@ -161,8 +161,10 @@ def __init__(self, parent): self.setDragEnabled(True) self.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop) + # pylint: disable=no-member self.itemClicked.connect(self.__itemSingleClickedCopy) self.itemClicked.connect(self.__itemSingleClickedComment) + # pylint: enable=no-member self.__load = {} self.startTicksUpdate(20, False, 60) diff --git a/cuegui/cuegui/LayerDialog.py b/cuegui/cuegui/LayerDialog.py index 4c79b805f..eb49b520c 100644 --- a/cuegui/cuegui/LayerDialog.py +++ b/cuegui/cuegui/LayerDialog.py @@ -51,7 +51,7 @@ def __init__(self, widget, enable, parent=None): if enable: self.__widget.setDisabled(True) layout.addWidget(self.__checkbox) - self.__checkbox.toggled.connect(self.enable) + self.__checkbox.toggled.connect(self.enable) # pylint: disable=no-member layout.addWidget(self.__widget) def getWidget(self): @@ -210,12 +210,14 @@ def __init__(self, layers, parent=None): self) # Setup signals + # pylint: disable=no-member self.__mem.slider.valueChanged.connect(self.__translateToMemSpinbox) self.__mem.spinner.valueChanged.connect(self.__translateToMemSlider) self.__gpu_mem.slider.valueChanged.connect(self.__translateToGpuMemSpinbox) self.__gpu_mem.spinner.valueChanged.connect(self.__translateToGpuMemSlider) self.__buttons.accepted.connect(self.verify) self.__buttons.rejected.connect(self.reject) + # pylint: enable=no-member # Set actual values once signals are setup self.__mem.slider.setValue(self.getMaxMemory()) @@ -520,8 +522,10 @@ def __init__(self, layers, parent=None): QtCore.Qt.Horizontal, self) + # pylint: disable=no-member self.__buttons.accepted.connect(self.accept) self.__buttons.rejected.connect(self.reject) + # pylint: enable=no-member def accept(self): self._tags_widget.apply() diff --git a/cuegui/cuegui/LimitsWidget.py b/cuegui/cuegui/LimitsWidget.py index b7eaccd3b..ec0753f2e 100644 --- a/cuegui/cuegui/LimitsWidget.py +++ b/cuegui/cuegui/LimitsWidget.py @@ -57,8 +57,10 @@ def __init__(self, parent): layout.addWidget(self.__btnRefresh, 0, 2) layout.addWidget(self.__monitorLimits, 2, 0, 3, 4) + # pylint: disable=no-member self.__btnAddLimit.clicked.connect(self.__addLimit) self.__btnRefresh.clicked.connect(self.updateSoon) + # pylint: enable=no-member self.__menuActions = cuegui.MenuActions.MenuActions(self, self.updateSoon, list) @@ -108,8 +110,8 @@ def __init__(self, parent): self.__menuActions = cuegui.MenuActions.MenuActions( self, self.updateSoon, self.selectedObjects) - self.itemClicked.connect(self.__itemSingleClickedToDouble) # pylint: disable=no-member + self.itemClicked.connect(self.__itemSingleClickedToDouble) QtGui.qApp.facility_changed.connect(self.__facilityChanged) # pylint: enable=no-member diff --git a/cuegui/cuegui/LocalBooking.py b/cuegui/cuegui/LocalBooking.py index 475f0536f..a69270198 100644 --- a/cuegui/cuegui/LocalBooking.py +++ b/cuegui/cuegui/LocalBooking.py @@ -76,7 +76,7 @@ def __init__(self, target, parent=None): self.__msg_widget = QtWidgets.QLabel(msg, self) self.layout().addWidget(self.__msg_widget) self.layout().addWidget(self.__deed_button) - self.__deed_button.pressed.connect(self.deedLocalhost) + self.__deed_button.pressed.connect(self.deedLocalhost) # pylint: disable=no-member self.__lba_group.setDisabled(True) self.__text_target = QtWidgets.QLabel(self.__target.data.name, self) @@ -124,9 +124,8 @@ def __init__(self, target, parent=None): self.__btn_clear = QtWidgets.QPushButton("Clear", self) - # # Setup the signals. - # + # pylint: disable=no-member self.__btn_clear.pressed.connect(self.clearCurrentHost) self.__select_host.activated.connect(self.__host_changed) self.__num_mem.valueChanged.connect(self.__text_num_mem.setValue) @@ -135,6 +134,7 @@ def __init__(self, target, parent=None): self.__num_frames.valueChanged.connect(self.__calculateCores) self.__run_mem.valueChanged.connect(self.__text_run_mem.setValue) self.__text_run_mem.valueChanged.connect(self.__run_mem.setValue) + # pylint: enable=no-member self.layout().addWidget(QtWidgets.QLabel("Target Host:")) self.layout().addWidget(self.__select_host) @@ -367,9 +367,11 @@ def __init__(self, target, parent=None): self.layout().addWidget(self.__booking) self.layout().addLayout(btn_layout) + # pylint: disable=no-member self.__booking.hosts_changed.connect(self.__updateOkButtion) self.__btn_ok.pressed.connect(self.doLocalBooking) self.__btn_cancel.pressed.connect(self.close) + # pylint: enable=no-member def __updateOkButtion(self): self.__btn_ok.setDisabled(not self.__booking.hostAvailable()) diff --git a/cuegui/cuegui/Main.py b/cuegui/cuegui/Main.py index b2c540c74..b97e3d885 100644 --- a/cuegui/cuegui/Main.py +++ b/cuegui/cuegui/Main.py @@ -72,6 +72,7 @@ def startup(app_name, app_version, argv): """Starts an application window.""" app = CueGuiApplication(argv) + QtGui.qApp = app # Start splash screen splash = cuegui.SplashWindow.SplashWindow( @@ -84,10 +85,12 @@ def startup(app_name, app_version, argv): app.setWindowIcon(QtGui.QIcon('%s/windowIcon.png' % cuegui.Constants.RESOURCE_PATH)) app.setApplicationName(app_name) - app.lastWindowClosed.connect(app.quit) + app.lastWindowClosed.connect(app.quit) # pylint: disable=no-member + # pylint: disable=attribute-defined-outside-init QtGui.qApp.threadpool = cuegui.ThreadPool.ThreadPool(3, parent=app) QtGui.qApp.threads = [] + # pylint: enable=attribute-defined-outside-init config_path = "/.%s/config" % app_name.lower() settings = QtCore.QSettings(QtCore.QSettings.IniFormat, QtCore.QSettings.UserScope, config_path) @@ -96,7 +99,7 @@ def startup(app_name, app_version, argv): if settings.value('RevertLayout'): os.remove(local) - QtGui.qApp.settings = settings + QtGui.qApp.settings = settings # pylint: disable=attribute-defined-outside-init cuegui.Style.init() @@ -130,18 +133,14 @@ def startup(app_name, app_version, argv): # TODO(#609) Refactor the CueGUI classes to make this garbage collector # replacement unnecessary. - # pylint: disable=unused-variable - gc = cuegui.GarbageCollector.GarbageCollector(parent=app, debug=False) - # pylint: enable=unused-variable - app.aboutToQuit.connect(closingTime) + gc = cuegui.GarbageCollector.GarbageCollector(parent=app, debug=False) # pylint: disable=unused-variable + app.aboutToQuit.connect(closingTime) # pylint: disable=no-member app.exec_() def closingTime(): """Window close callback.""" logger.info("Closing all threads...") - # pylint: disable=no-member - threads = QtGui.qApp.threads - # pylint: enable=no-member + threads = QtGui.qApp.threads # pylint: disable=no-member for thread in threads: cuegui.Utils.shutdownThread(thread) diff --git a/cuegui/cuegui/MainWindow.py b/cuegui/cuegui/MainWindow.py index 35891e2fd..9fd5c5492 100644 --- a/cuegui/cuegui/MainWindow.py +++ b/cuegui/cuegui/MainWindow.py @@ -205,14 +205,14 @@ def __createMenus(self): # Menu Bar: File -> Close Window close = QtWidgets.QAction(QtGui.QIcon('icons/exit.png'), '&Close Window', self) close.setStatusTip('Close Window') - close.triggered.connect(self.__windowCloseWindow) + close.triggered.connect(self.__windowCloseWindow) # pylint: disable=no-member self.fileMenu.addAction(close) # Menu Bar: File -> Exit Application exitAction = QtWidgets.QAction(QtGui.QIcon('icons/exit.png'), 'E&xit Application', self) exitAction.setShortcut('Ctrl+Q') exitAction.setStatusTip('Exit application') - exitAction.triggered.connect(self.__windowCloseApplication) + exitAction.triggered.connect(self.__windowCloseApplication) # pylint: disable=no-member self.fileMenu.addAction(exitAction) self.__windowMenuSetup(self.windowMenu) @@ -223,17 +223,17 @@ def __createMenus(self): # Menu Bar: Help -> Online User Guide. action = QtWidgets.QAction('Online User Guide', self) - action.triggered.connect(self.openUserGuide) + action.triggered.connect(self.openUserGuide) # pylint: disable=no-member self.helpMenu.addAction(action) # Menu Bar: Help -> Make a Suggestion action = QtWidgets.QAction('Make a Suggestion', self) - action.triggered.connect(self.openSuggestionPage) + action.triggered.connect(self.openSuggestionPage) # pylint: disable=no-member self.helpMenu.addAction(action) # Menu Bar: Help -> Report a Bug action = QtWidgets.QAction('Report a Bug', self) - action.triggered.connect(self.openBugPage) + action.triggered.connect(self.openBugPage) # pylint: disable=no-member self.helpMenu.addAction(action) self.helpMenu.addSeparator() @@ -242,7 +242,7 @@ def __createMenus(self): about = QtWidgets.QAction(QtGui.QIcon('icons/about.png'), 'About', self) about.setShortcut('F1') about.setStatusTip('About') - about.triggered.connect(self.displayAbout) + about.triggered.connect(self.displayAbout) # pylint: disable=no-member self.helpMenu.addAction(about) ################################################################################ @@ -255,17 +255,17 @@ def __windowMenuSetup(self, menu): # Menu Bar: Window -> Change Window Title changeTitle = QtWidgets.QAction("Change Window Title", self) - changeTitle.triggered.connect(self.__windowMenuHandleChangeTitle) + changeTitle.triggered.connect(self.__windowMenuHandleChangeTitle) # pylint: disable=no-member menu.addAction(changeTitle) # Menu Bar: Window -> Save Window Settings saveWindowSettings = QtWidgets.QAction("Save Window Settings", self) - saveWindowSettings.triggered.connect(self.__saveSettings) + saveWindowSettings.triggered.connect(self.__saveSettings) # pylint: disable=no-member menu.addAction(saveWindowSettings) # Menu Bar: Window -> Revert To Default Window Layout revertWindowSettings = QtWidgets.QAction("Revert To Default Window Layout", self) - revertWindowSettings.triggered.connect(self.__revertLayout) + revertWindowSettings.triggered.connect(self.__revertLayout) # pylint: disable=no-member menu.addAction(revertWindowSettings) menu.addSeparator() @@ -405,7 +405,7 @@ def __toggleFullscreenSetup(self, menu): QtGui.QIcon('icons/fullscreen.png'), 'Toggle Full-Screen', self) fullscreen.setShortcut('Ctrl+F') fullscreen.setStatusTip('Toggle Full-Screen') - fullscreen.triggered.connect(self.__toggleFullscreen) + fullscreen.triggered.connect(self.__toggleFullscreen) # pylint: disable=no-member menu.addAction(fullscreen) def __toggleFullscreen(self): diff --git a/cuegui/cuegui/MenuActions.py b/cuegui/cuegui/MenuActions.py index 68f0b6cc8..fc615283f 100644 --- a/cuegui/cuegui/MenuActions.py +++ b/cuegui/cuegui/MenuActions.py @@ -159,7 +159,7 @@ def addAction(self, menu, actionName, callback = None): if isinstance(callback, six.string_types): callback = getattr(self, callback) - action.triggered.connect(callback) + action.triggered.connect(callback) # pylint: disable=no-member self.__actionCache[key] = action menu.addAction(self.__actionCache[key]) diff --git a/cuegui/cuegui/ProcMonitor.py b/cuegui/cuegui/ProcMonitor.py index 63035d7da..84e01fd4b 100644 --- a/cuegui/cuegui/ProcMonitor.py +++ b/cuegui/cuegui/ProcMonitor.py @@ -71,10 +71,8 @@ def __init__(self, parent): self.__viewHostsSetup() - # pylint: disable=no-member - if bool(int(QtGui.qApp.settings.value("AutoRefreshMonitorProc", 1))): + if bool(int(QtGui.qApp.settings.value("AutoRefreshMonitorProc", 1))): # pylint: disable=no-member self.updateRequest() - # pylint: enable=no-member def updateRequest(self): """Requests an update to the widget's contents.""" @@ -112,11 +110,11 @@ def __filterByHostNameSetup(self, layout): btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setFixedWidth(24) layout.addWidget(btn) - btn.clicked.connect(self.__filterByHostNameClear) + btn.clicked.connect(self.__filterByHostNameClear) # pylint: disable=no-member self.__filterByHostNameClearBtn = btn self.__filterByHostNameLastInput = None - self.__filterByHostName.editingFinished.connect(self.__filterByHostNameHandle) + self.__filterByHostName.editingFinished.connect(self.__filterByHostNameHandle) # pylint: disable=no-member def __filterByHostNameHandle(self): hosts = str(self.__filterByHostName.text()).split() @@ -138,7 +136,7 @@ def __refreshToggleCheckBoxSetup(self, layout): layout.addWidget(checkBox) if self.procMonitorTree.enableRefresh: checkBox.setCheckState(QtCore.Qt.Checked) - checkBox.stateChanged.connect(self.__refreshToggleCheckBoxHandle) + checkBox.stateChanged.connect(self.__refreshToggleCheckBoxHandle) # pylint: disable=no-member __refreshToggleCheckBoxCheckBox = checkBox def __refreshToggleCheckBoxHandle(self, state): @@ -158,7 +156,7 @@ def __refreshButtonSetup(self, layout): self.btn_refresh.setMaximumHeight(FILTER_HEIGHT) self.btn_refresh.setFocusPolicy(QtCore.Qt.NoFocus) layout.addWidget(self.btn_refresh) - self.btn_refresh.clicked.connect(self.procMonitorTree.updateRequest) + self.btn_refresh.clicked.connect(self.procMonitorTree.updateRequest) # pylint: disable=no-member self.procMonitorTree.updated.connect(self.__refreshButtonDisableHandle) def __refreshButtonEnableHandle(self): @@ -182,7 +180,7 @@ def __clearButtonSetup(self, layout): btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setContentsMargins(0,0,0,0) layout.addWidget(btn) - btn.clicked.connect(self.__clearButtonHandle) + btn.clicked.connect(self.__clearButtonHandle) # pylint: disable=no-member def __clearButtonHandle(self): """Called when the clear button is clicked""" @@ -194,9 +192,7 @@ def __clearButtonHandle(self): # Monitors and handles the view_procs signal # ============================================================================== def __viewProcsSetup(self): - # pylint: disable=no-member - QtGui.qApp.view_procs.connect(self.__viewProcsHandle) - # pylint: enable=no-member + QtGui.qApp.view_procs.connect(self.__viewProcsHandle) # pylint: disable=no-member def __viewProcsHandle(self, hosts): self.procMonitorTree.procSearch.options['host'] = hosts @@ -206,9 +202,7 @@ def __viewProcsHandle(self, hosts): # Views procs when a host is double clicked # ============================================================================== def __hostDoubleClickedSetup(self): - # pylint: disable=no-member - QtGui.qApp.view_object.connect(self.__hostDoubleClickedHandle) - # pylint: enable=no-member + QtGui.qApp.view_object.connect(self.__hostDoubleClickedHandle) # pylint: disable=no-member def __hostDoubleClickedHandle(self, rpcObject): if cuegui.Utils.isHost(rpcObject): @@ -219,9 +213,7 @@ def __hostDoubleClickedHandle(self, rpcObject): # Monitors and handles the view_hosts signal # ============================================================================== def __viewHostsSetup(self): - # pylint: disable=no-member - QtGui.qApp.view_hosts.connect(self.__viewHostsHandle) - # pylint: enable=no-member + QtGui.qApp.view_hosts.connect(self.__viewHostsHandle) # pylint: disable=no-member def __viewHostsHandle(self, hosts): if hosts: diff --git a/cuegui/cuegui/ProcMonitorTree.py b/cuegui/cuegui/ProcMonitorTree.py index 9f67dabe3..97171e08f 100644 --- a/cuegui/cuegui/ProcMonitorTree.py +++ b/cuegui/cuegui/ProcMonitorTree.py @@ -85,7 +85,7 @@ def __init__(self, parent): self.__menuActions = cuegui.MenuActions.MenuActions( self, self.updateSoon, self.selectedObjects) - self.itemClicked.connect(self.__itemSingleClickedCopy) + self.itemClicked.connect(self.__itemSingleClickedCopy) # pylint: disable=no-member self.itemDoubleClicked.connect(self.__itemDoubleClickedViewLog) # Don't use the standard space bar to refresh diff --git a/cuegui/cuegui/ProgressDialog.py b/cuegui/cuegui/ProgressDialog.py index 399a1c64a..375e2a189 100644 --- a/cuegui/cuegui/ProgressDialog.py +++ b/cuegui/cuegui/ProgressDialog.py @@ -83,7 +83,7 @@ def __init__(self, title, function, work, concurrent, cancelTitle, self.setFixedSize(300, 100) self.setWindowTitle(title) - self.__btn_cancel.clicked.connect(self.cancel) + self.__btn_cancel.clicked.connect(self.cancel) # pylint: disable=no-member self.show() diff --git a/cuegui/cuegui/Redirect.py b/cuegui/cuegui/Redirect.py index cdbaa5b35..ffdbfb534 100644 --- a/cuegui/cuegui/Redirect.py +++ b/cuegui/cuegui/Redirect.py @@ -80,7 +80,7 @@ def __init__(self, parent=None): # This is used to provide the number of allocations selected # on the button title. - self.__menu.triggered.connect(self.__afterClicked) + self.__menu.triggered.connect(self.__afterClicked) # pylint: disable=no-member def refresh(self): """Refreshes the full list of allocations.""" @@ -165,7 +165,7 @@ def __init__(self, show, name, parent=None): self.setMenu(self.__menu) - self.__menu.aboutToShow.connect(self.__populate_menu) + self.__menu.aboutToShow.connect(self.__populate_menu) # pylint: disable=no-member # pylint: disable=inconsistent-return-statements def __loadShow(self, show): @@ -281,8 +281,10 @@ def __init__(self, parent=None): layout.addWidget(self.__group) layout.addLayout(layout1) + # pylint: disable=no-member self.__job_box.textChanged.connect(self.detect) self.__show_combo.currentIndexChanged.connect(self.showChanged) + # pylint: enable=no-member def _cfg(self): ''' @@ -411,10 +413,12 @@ def __init__(self, parent=None): layout.addWidget(self.__controls) layout.addWidget(self.__tree) + # pylint: disable=no-member self.__controls.getUpdateButton().pressed.connect(self.update) self.__controls.getRedirectButton().pressed.connect(self.redirect) self.__controls.getSelectAllButton().pressed.connect(self.selectAll) self.__controls.getClearButton().pressed.connect(self.clearTarget) + # pylint: enable=no-member def __get_selected_procs_by_alloc(self, selected_items): """ diff --git a/cuegui/cuegui/ServiceDialog.py b/cuegui/cuegui/ServiceDialog.py index f88e568c0..5f78cf670 100644 --- a/cuegui/cuegui/ServiceDialog.py +++ b/cuegui/cuegui/ServiceDialog.py @@ -99,7 +99,7 @@ def __init__(self, parent=None): layout.addWidget(self.__buttons, 9, 1) - self.__buttons.accepted.connect(self.save) + self.__buttons.accepted.connect(self.save) # pylint: disable=no-member def _cfg(self): """ @@ -207,10 +207,12 @@ def __init__(self, show, parent=None): self.__btn_layout.addStretch() layout.addLayout(self.__btn_layout) + # pylint: disable=no-member self.__btn_new.clicked.connect(self.newService) self.__btn_del.clicked.connect(self.delService) self.__form.saved.connect(self.saved) self.__service_list.currentItemChanged.connect(self.selected) + # pylint: enable=no-member self.refresh() self.__service_list.setCurrentRow(0, QtCore.QItemSelectionModel.Select) diff --git a/cuegui/cuegui/ShowDialog.py b/cuegui/cuegui/ShowDialog.py index 865e75aa6..7acdfec26 100644 --- a/cuegui/cuegui/ShowDialog.py +++ b/cuegui/cuegui/ShowDialog.py @@ -56,8 +56,10 @@ def __init__(self, show, parent=None): self.layout().addWidget(self.__btnSave, 5, 1) self.layout().addWidget(self.__btnClose, 5, 2) + # pylint: disable=no-member self.__btnSave.clicked.connect(self.__saveChanges) self.__btnClose.clicked.connect(self.__closeDialog) + # pylint: enable=no-member def __createSettingsPage(self): """Settings Page""" @@ -72,7 +74,7 @@ def __createSettingsPage(self): ctrl.setValue(self.__show.data.default_max_cores) page.layout().addWidget(ctrl, 0, 0) page.layout().addWidget(label, 0, 1, 1, 4) - ctrl.valueChanged.connect(self.__valueChanged) + ctrl.valueChanged.connect(self.__valueChanged) # pylint: disable=no-member self.__defaultMaxCores = ctrl label = QtWidgets.QLabel("Default minimum cores", self) @@ -82,7 +84,7 @@ def __createSettingsPage(self): ctrl.setValue(self.__show.data.default_min_cores) page.layout().addWidget(ctrl, 1, 0) page.layout().addWidget(label, 1, 1, 1, 4) - ctrl.valueChanged.connect(self.__valueChanged) + ctrl.valueChanged.connect(self.__valueChanged) # pylint: disable=no-member self.__defaultMinCores = ctrl label = QtWidgets.QLabel("Comment Notification Email", self) @@ -90,7 +92,7 @@ def __createSettingsPage(self): text.setText(self.__show.data.comment_email) page.layout().addWidget(text, 2, 0) page.layout().addWidget(label, 2, 1, 1, 4) - text.textChanged.connect(self.__valueChanged) + text.textChanged.connect(self.__valueChanged) # pylint: disable=no-member self.__show_email = text return page @@ -105,7 +107,7 @@ def __createBookingPage(self): ctrl.setChecked(self.__show.data.booking_enabled) page.layout().addWidget(ctrl, 0, 0) page.layout().addWidget(label, 0, 1, 1, 4) - ctrl.stateChanged.connect(self.__valueChanged) + ctrl.stateChanged.connect(self.__valueChanged) # pylint: disable=no-member self.__bookingEnabled = ctrl label = QtWidgets.QLabel("Enable dispatch", self) @@ -113,7 +115,7 @@ def __createBookingPage(self): ctrl.setChecked(self.__show.data.dispatch_enabled) page.layout().addWidget(ctrl, 1, 0) page.layout().addWidget(label, 1, 1, 1, 4) - ctrl.stateChanged.connect(self.__valueChanged) + ctrl.stateChanged.connect(self.__valueChanged) # pylint: disable=no-member self.__dispatchEnabled = ctrl return page diff --git a/cuegui/cuegui/ShowsWidget.py b/cuegui/cuegui/ShowsWidget.py index b0343834f..a91685cd1 100644 --- a/cuegui/cuegui/ShowsWidget.py +++ b/cuegui/cuegui/ShowsWidget.py @@ -62,8 +62,8 @@ def __init__(self, parent): self.__menuActions = cuegui.MenuActions.MenuActions( self, self.updateSoon, self.selectedObjects) - self.itemClicked.connect(self.__itemSingleClickedToDouble) # pylint: disable=no-member + self.itemClicked.connect(self.__itemSingleClickedToDouble) QtGui.qApp.facility_changed.connect(self.__facilityChanged) # pylint: enable=no-member diff --git a/cuegui/cuegui/SubscriptionGraphWidget.py b/cuegui/cuegui/SubscriptionGraphWidget.py index 2e122328c..e129ed3eb 100644 --- a/cuegui/cuegui/SubscriptionGraphWidget.py +++ b/cuegui/cuegui/SubscriptionGraphWidget.py @@ -43,7 +43,7 @@ def __init__(self, parent): self.__showMenuActions = {} self.__subBars = [] self.__timer = QtCore.QTimer(self) - self.__timer.timeout.connect(self.update_data) + self.__timer.timeout.connect(self.update_data) # pylint: disable=no-member self.__timer.setInterval(1000 * 5) widget = QtWidgets.QWidget() @@ -57,7 +57,7 @@ def __init__(self, parent): showMenuBtn = QtWidgets.QPushButton(" Shows") showMenuBtn.setFixedWidth(100) - showMenuBtn.pressed.connect(self.__showMenuCheck) + showMenuBtn.pressed.connect(self.__showMenuCheck) # pylint: disable=no-member self.__showMenu = QtWidgets.QMenu(self) showMenuBtn.setMenu(self.__showMenu) @@ -65,7 +65,7 @@ def __init__(self, parent): showMenuBtn.setFocusPolicy(QtCore.Qt.NoFocus) self.__showMenu.setFont(cuegui.Constants.STANDARD_FONT) - self.__showMenu.triggered.connect(self.__showMenuHandle) + self.__showMenu.triggered.connect(self.__showMenuHandle) # pylint: disable=no-member layout = QtWidgets.QVBoxLayout(self) layout.addWidget(showMenuBtn) @@ -228,7 +228,7 @@ def contextMenuEvent(self, e): menu.addSeparator() if self.__show: new_action = QtWidgets.QAction('Add new subscription', self) - new_action.triggered.connect(self.createSubscription) + new_action.triggered.connect(self.createSubscription) # pylint: disable=no-member menu.addAction(new_action) menu.exec_(QtCore.QPoint(e.globalX(),e.globalY())) diff --git a/cuegui/cuegui/SubscriptionsWidget.py b/cuegui/cuegui/SubscriptionsWidget.py index 3acb97921..8be93ad00 100644 --- a/cuegui/cuegui/SubscriptionsWidget.py +++ b/cuegui/cuegui/SubscriptionsWidget.py @@ -64,10 +64,10 @@ def __init__(self, parent): layout.addWidget(self.__btnAddSubscription, 0, 3) layout.addWidget(self.__monitorSubscriptions, 2, 0, 3, 4) + # pylint: disable=no-member self.__btnShowProperties.clicked.connect(self.__showProperties) self.__btnAddSubscription.clicked.connect(self.__addSubscription) self.__comboShows.currentIndexChanged.connect(self.setShow) - # pylint: disable=no-member QtGui.qApp.view_object.connect(self.setShow) QtGui.qApp.facility_changed.connect(self.changeFacility) # pylint: enable=no-member diff --git a/cuegui/cuegui/TagsWidget.py b/cuegui/cuegui/TagsWidget.py index cde10b910..e9d6dc129 100644 --- a/cuegui/cuegui/TagsWidget.py +++ b/cuegui/cuegui/TagsWidget.py @@ -61,7 +61,7 @@ def __init__(self, allowed_tags=None, parent=None): self.__enable_custom = QtWidgets.QCheckBox('Custom Tags', self) self.__custom = QtWidgets.QLineEdit(self) self.__custom.setDisabled(True) - self.__enable_custom.toggled.connect(self.toggleCustom) + self.__enable_custom.toggled.connect(self.toggleCustom) # pylint: disable=no-member layout.addWidget(self.__enable_custom) layout.addWidget(self.__custom) layout.setContentsMargins(0, 0, 0, 0) diff --git a/cuegui/cuegui/TasksDialog.py b/cuegui/cuegui/TasksDialog.py index f624fcf6e..614b07c2d 100644 --- a/cuegui/cuegui/TasksDialog.py +++ b/cuegui/cuegui/TasksDialog.py @@ -76,12 +76,14 @@ def __init__(self, show, parent=None): glayout.addWidget(self.__btnRefresh, 4, 1) glayout.addWidget(self.__btnDone, 4, 2) + # pylint: disable=no-member self.__btnMinCores.clicked.connect(self.setMinCores) self.__checkManaged.clicked.connect(self.setManaged) self.__btnAddTask.clicked.connect(self.__tasks.createTask) self.__btnRefresh.clicked.connect(self.refresh) self.__comboDepartments.currentIndexChanged.connect(self.setDepartment) self.__btnDone.clicked.connect(self.accept) + # pylint: enable=no-member self.getDepartments() diff --git a/cuegui/cuegui/TextEditDialog.py b/cuegui/cuegui/TextEditDialog.py index d6a14526d..ed25fe45d 100644 --- a/cuegui/cuegui/TextEditDialog.py +++ b/cuegui/cuegui/TextEditDialog.py @@ -57,8 +57,10 @@ def __init__(self, title, text, default="", parent=None): self.setMaximumSize(400,300) self.setWindowTitle(title) + # pylint: disable=no-member __btn_accept.clicked.connect(self.accept) __btn_cancel.clicked.connect(self.reject) + # pylint: enable=no-member self.__textEdit.setText(default) self.__textEdit.setFocus(QtCore.Qt.OtherFocusReason) diff --git a/cuegui/cuegui/UnbookDialog.py b/cuegui/cuegui/UnbookDialog.py index b392e3d4a..e74149665 100644 --- a/cuegui/cuegui/UnbookDialog.py +++ b/cuegui/cuegui/UnbookDialog.py @@ -133,6 +133,7 @@ def __createRangeBox(self, layout, name, units, max_frame): __layout.addWidget(__maxLabel, 0, 4) # Setting the minimum should disable the right hand side of the range + # pylint: disable=no-member __lessThan.toggled.connect(__min.setDisabled) __lessThan.toggled.connect(__toLabel.setDisabled) __lessThan.toggled.connect(__minLabel.setDisabled) @@ -141,6 +142,7 @@ def __createRangeBox(self, layout, name, units, max_frame): __moreThan.toggled.connect(__max.setDisabled) __moreThan.toggled.connect(__toLabel.setDisabled) __moreThan.toggled.connect(__maxLabel.setDisabled) + # pylint: enable=no-member layout.addWidget(__group) @@ -345,7 +347,7 @@ def __init__( self.__filter = QtWidgets.QLineEdit("", self) self.layout().addWidget(self.__filter, 2, 0) - self.__filter.textChanged.connect(self.filterJobs) + self.__filter.textChanged.connect(self.filterJobs) # pylint: disable=no-member self.__list = QtWidgets.QListWidget(self) self.__list.setSelectionMode(selectionMode) @@ -431,8 +433,10 @@ def __init__(self, procSearch, parent=None): layout.addWidget(self.__jobList) layout.addWidget(self.__buttons) + # pylint: disable=no-member self.__buttons.accepted.connect(self.accept) self.__buttons.rejected.connect(self.reject) + # pylint: enable=no-member def accept(self): """Kills the procs.""" diff --git a/cuegui/cuegui/images/crystal/icons_rcc.py b/cuegui/cuegui/images/crystal/icons_rcc.py index 0ce55b24f..87d4c83d9 100644 --- a/cuegui/cuegui/images/crystal/icons_rcc.py +++ b/cuegui/cuegui/images/crystal/icons_rcc.py @@ -15,6 +15,8 @@ # -*- coding: utf-8 -*- +# pylint: disable=missing-function-docstring,missing-module-docstring + # Resource object code # # Created by: The Resource Compiler for PyQt (Qt v4.6.2) diff --git a/cuegui/cuegui/images/icons_rcc.py b/cuegui/cuegui/images/icons_rcc.py index cc9df44af..b313c2d56 100644 --- a/cuegui/cuegui/images/icons_rcc.py +++ b/cuegui/cuegui/images/icons_rcc.py @@ -14,6 +14,8 @@ # -*- coding: utf-8 -*- +# pylint: disable=missing-function-docstring,missing-module-docstring + # Resource object code # # Created: Tue Jul 15 11:26:55 2008 diff --git a/cuegui/cuegui/plugins/AttributesPlugin.py b/cuegui/cuegui/plugins/AttributesPlugin.py index da4693d06..b20825204 100644 --- a/cuegui/cuegui/plugins/AttributesPlugin.py +++ b/cuegui/cuegui/plugins/AttributesPlugin.py @@ -224,7 +224,7 @@ def addData(parent, value): self.addTopLevelItem(root) self.expandAll() - self.itemSelectionChanged.connect(self.itemSingleClickedCopy) + self.itemSelectionChanged.connect(self.itemSingleClickedCopy) # pylint: disable=no-member def itemSingleClickedCopy(self): """Event handler that copies the text of the selected line to the clipboard on click.""" diff --git a/cuegui/cuegui/plugins/LogViewPlugin.py b/cuegui/cuegui/plugins/LogViewPlugin.py index 9fc5b21d7..8e8486a1b 100644 --- a/cuegui/cuegui/plugins/LogViewPlugin.py +++ b/cuegui/cuegui/plugins/LogViewPlugin.py @@ -99,20 +99,22 @@ def __init__(self, parent): self.document().setDefaultFont(self.font) self._line_num_area = LineNumberArea(self) + # pylint: disable=no-member self.blockCountChanged.connect(self.update_line_number_area_width) self.updateRequest.connect(self.update_line_number_area) self.cursorPositionChanged.connect(self.highlight_current_line) + # pylint: enable=no-member self.update_line_number_area_width() self.setReadOnly(True) self.setMaximumBlockCount(20000) self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) - self.customContextMenuRequested.connect(self.context_menu) + self.customContextMenuRequested.connect(self.context_menu) # pylint: disable=no-member self.copy_action = QtWidgets.QAction('Copy', self) self.copy_action.setStatusTip('Copy Selection') self.copy_action.setShortcut('Ctrl+C') - self.copy_action.triggered[bool].connect(lambda triggered: + self.copy_action.triggered[bool].connect(lambda triggered: # pylint: disable=unsubscriptable-object self.copy_selection(QtGui.QClipboard.Clipboard)) self.addAction(self.copy_action) @@ -231,9 +233,11 @@ def highlight_current_line(self): crnt_selection = QtWidgets.QTextEdit.ExtraSelection() line_color = QtGui.QColor(QtCore.Qt.red).lighter(12) + # pylint: disable=no-member crnt_selection.format.setBackground(line_color) crnt_selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True) + # pylint: enable=no-member crnt_selection.cursor = self.textCursor() crnt_selection.cursor.clearSelection() self.setExtraSelections([crnt_selection]) @@ -314,23 +318,23 @@ def __init__(self, parent=None): path_layout = QtWidgets.QHBoxLayout(path_widget) path_layout.setContentsMargins(0, 0, 0, 0) self._first_log_button = QtWidgets.QPushButton('<<', self) - self._first_log_button.clicked.connect( + self._first_log_button.clicked.connect( # pylint: disable=no-member lambda: self._load_other_log(float('inf'))) self._first_log_button.setEnabled(False) self._first_log_button.setToolTip('Load First Log') path_layout.addWidget(self._first_log_button) self._prev_log_button = QtWidgets.QPushButton('<', self) - self._prev_log_button.clicked.connect(lambda: self._load_other_log(1)) + self._prev_log_button.clicked.connect(lambda: self._load_other_log(1)) # pylint: disable=no-member self._prev_log_button.setEnabled(False) self._prev_log_button.setToolTip('Load Previous Log') path_layout.addWidget(self._prev_log_button) self._next_log_button = QtWidgets.QPushButton('>', self) - self._next_log_button.clicked.connect(lambda: self._load_other_log(-1)) + self._next_log_button.clicked.connect(lambda: self._load_other_log(-1)) # pylint: disable=no-member self._next_log_button.setEnabled(False) self._next_log_button.setToolTip('Load Next Log') path_layout.addWidget(self._next_log_button) self._last_log_button = QtWidgets.QPushButton('>>', self) - self._last_log_button.clicked.connect( + self._last_log_button.clicked.connect( # pylint: disable=no-member lambda: self._load_other_log(-float('inf'))) self._last_log_button.setEnabled(False) self._last_log_button.setToolTip('Load Current Log') @@ -353,7 +357,7 @@ def __init__(self, parent=None): self._word_wrap_checkbox.setFont(font) path_layout.addWidget(self._word_wrap_checkbox) self._word_wrap_checkbox.setCheckState(QtCore.Qt.Checked) - self._word_wrap_checkbox.stateChanged.connect(self._set_word_wrap) + self._word_wrap_checkbox.stateChanged.connect(self._set_word_wrap) # pylint: disable=no-member # Content content_widget = QtWidgets.QWidget(self) @@ -377,30 +381,30 @@ def __init__(self, parent=None): search_layout = QtWidgets.QHBoxLayout(search_widget) self._case_stv_checkbox = QtWidgets.QCheckBox('Aa') search_layout.addWidget(self._case_stv_checkbox) - self._case_stv_checkbox.stateChanged.connect(self._move_to_search_box) + self._case_stv_checkbox.stateChanged.connect(self._move_to_search_box) # pylint: disable=no-member self._search_box = QtWidgets.QLineEdit('', self) self._search_box.setClearButtonEnabled(True) self._search_box.setPlaceholderText('Search log...') search_layout.addWidget(self._search_box) self._search_box.show() - self._search_box.editingFinished.connect(self._find_text) + self._search_box.editingFinished.connect(self._find_text) # pylint: disable=no-member self._search_button = QtWidgets.QPushButton('Find', self) search_layout.addWidget(self._search_button) self._prev_button = QtWidgets.QPushButton('Prev') - self._prev_button.clicked.connect(self._move_to_prev_match) + self._prev_button.clicked.connect(self._move_to_prev_match) # pylint: disable=no-member self._next_button = QtWidgets.QPushButton('Next') - self._next_button.clicked.connect(self._move_to_next_match) + self._next_button.clicked.connect(self._move_to_next_match) # pylint: disable=no-member search_layout.addWidget(self._next_button) search_layout.addWidget(self._prev_button) search_refresh_button = QtWidgets.QPushButton('Refresh', self) search_layout.addWidget(search_refresh_button) - search_refresh_button.clicked.connect(self._move_to_search_box) + search_refresh_button.clicked.connect(self._move_to_search_box) # pylint: disable=no-member clear_search_button = QtWidgets.QPushButton('Clr', self) search_layout.addWidget(clear_search_button) - clear_search_button.clicked.connect(self._clear_search_text) - self._search_button.clicked.connect(self._find_text) + clear_search_button.clicked.connect(self._clear_search_text) # pylint: disable=no-member + self._search_button.clicked.connect(self._find_text) # pylint: disable=no-member matches_widget = QtWidgets.QWidget(self) matches_layout = QtWidgets.QHBoxLayout(matches_widget) diff --git a/cuegui/cuegui/plugins/MonitorCuePlugin.py b/cuegui/cuegui/plugins/MonitorCuePlugin.py index 6f07b80e0..8edbda25b 100644 --- a/cuegui/cuegui/plugins/MonitorCuePlugin.py +++ b/cuegui/cuegui/plugins/MonitorCuePlugin.py @@ -112,7 +112,7 @@ def __expandAllSetup(self): btn.setIcon(QtGui.QIcon(":down.png")) btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setToolTip("Expand all groups") - btn.clicked.connect(self.__monitorCue.expandAll) + btn.clicked.connect(self.__monitorCue.expandAll) # pylint: disable=no-member def __collapseAllSetup(self): """Sets up the collapse all button""" @@ -121,7 +121,7 @@ def __collapseAllSetup(self): btn.setIcon(QtGui.QIcon(":up.png")) btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setToolTip("Collapse all groups") - btn.clicked.connect(self.__monitorCue.collapseAll) + btn.clicked.connect(self.__monitorCue.collapseAll) # pylint: disable=no-member def __buttonSetup(self, layout): btn = QtWidgets.QPushButton(QtGui.QIcon(":eat.png"), "") @@ -129,35 +129,35 @@ def __buttonSetup(self, layout): btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setFlat(True) layout.addWidget(btn) - btn.clicked.connect(self.__monitorCue.actionEatSelectedItems) + btn.clicked.connect(self.__monitorCue.actionEatSelectedItems) # pylint: disable=no-member btn = QtWidgets.QPushButton(QtGui.QIcon(":retry.png"), "") btn.setToolTip("Retries all dead frames for selected jobs") btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setFlat(True) layout.addWidget(btn) - btn.clicked.connect(self.__monitorCue.actionRetrySelectedItems) + btn.clicked.connect(self.__monitorCue.actionRetrySelectedItems) # pylint: disable=no-member btn = QtWidgets.QPushButton(QtGui.QIcon(":kill.png"), "") btn.setToolTip("Kill selected jobs") btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setFlat(True) layout.addWidget(btn) - btn.clicked.connect(self.__monitorCue.actionKillSelectedItems) + btn.clicked.connect(self.__monitorCue.actionKillSelectedItems) # pylint: disable=no-member btn = QtWidgets.QPushButton(QtGui.QIcon(":pause.png"), "") btn.setToolTip("Pause selected jobs") btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setFlat(True) layout.addWidget(btn) - btn.clicked.connect(self.__monitorCue.actionPauseSelectedItems) + btn.clicked.connect(self.__monitorCue.actionPauseSelectedItems) # pylint: disable=no-member btn = QtWidgets.QPushButton(QtGui.QIcon(":unpause.png"), "") btn.setToolTip("Unpause selected jobs") btn.setFocusPolicy(QtCore.Qt.NoFocus) btn.setFlat(True) layout.addWidget(btn) - btn.clicked.connect(self.__monitorCue.actionResumeSelectedItems) + btn.clicked.connect(self.__monitorCue.actionResumeSelectedItems) # pylint: disable=no-member ################################################################################ @@ -168,15 +168,15 @@ def __showMenuSetup(self): """Sets up the show selection menu""" self.__showMenuBtn = QtWidgets.QPushButton("Shows ",self) self.__showMenuBtn.setIcon(QtGui.QIcon(":show.png")) - self.__showMenuBtn.pressed.connect(self.__showMenuCheck) + self.__showMenuBtn.pressed.connect(self.__showMenuCheck) # pylint: disable=no-member self.__toolbar.addWidget(self.__showMenuBtn) self.__showMenu = QtWidgets.QMenu(self) self.__showMenuBtn.setMenu(self.__showMenu) self.__showMenuBtn.setFocusPolicy(QtCore.Qt.NoFocus) self.__showMenu.setFont(cuegui.Constants.STANDARD_FONT) - self.__showMenu.triggered.connect(self.__showMenuHandle) # pylint: disable=no-member + self.__showMenu.triggered.connect(self.__showMenuHandle) QtGui.qApp.facility_changed.connect(self.__showMenuUpdate) # pylint: enable=no-member @@ -248,23 +248,23 @@ def __selectJobsSetup(self): select_btn = QtWidgets.QPushButton("Select:") select_btn.setFocusPolicy(QtCore.Qt.NoFocus) self.__toolbar.addWidget(select_btn) - select_btn.clicked.connect(self.__selectJobsHandle) + select_btn.clicked.connect(self.__selectJobsHandle) # pylint: disable=no-member self._selectJobsEditBox = JobSelectEditBox(self) self.__toolbar.addWidget(self._selectJobsEditBox) - self._selectJobsEditBox.returnPressed.connect(self.__selectJobsHandle) + self._selectJobsEditBox.returnPressed.connect(self.__selectJobsHandle) # pylint: disable=no-member clear_btn = QtWidgets.QPushButton("Clr") clear_btn.setFocusPolicy(QtCore.Qt.NoFocus) clear_btn.setFixedWidth(24) self.__toolbar.addWidget(clear_btn) - clear_btn.clicked.connect(self._selectJobsEditBox.actionClear) + clear_btn.clicked.connect(self._selectJobsEditBox.actionClear) # pylint: disable=no-member mine_btn = QtWidgets.QPushButton("selectMine") mine_btn.setFocusPolicy(QtCore.Qt.NoFocus) mine_btn.setFixedWidth(70) self.__toolbar.addWidget(mine_btn) - mine_btn.clicked.connect(self.__selectJobsHandleMine) + mine_btn.clicked.connect(self.__selectJobsHandleMine) # pylint: disable=no-member def __selectJobsHandle(self, value = None): """This will select all jobs that have a name that contain the substring @@ -379,7 +379,7 @@ def actionClear(self): def _actionSelect(self): """Signals that a return was pressed""" - self.returnPressed.emit() + self.returnPressed.emit() # pylint: disable=no-member def keyPressEvent(self, event): """Let the parent handle any space key presses""" diff --git a/cuegui/cuegui/plugins/MonitorJobDetailsPlugin.py b/cuegui/cuegui/plugins/MonitorJobDetailsPlugin.py index b731736c4..809cefbfc 100644 --- a/cuegui/cuegui/plugins/MonitorJobDetailsPlugin.py +++ b/cuegui/cuegui/plugins/MonitorJobDetailsPlugin.py @@ -70,7 +70,7 @@ def __init__(self, parent): QtGui.qApp.facility_changed.connect(self.__setJob) # pylint: enable=no-member self.__monitorLayers.handle_filter_layers_byLayer.connect(self.handleLayerFilter) - self.__splitter.splitterMoved.connect(self.__splitterMoved) + self.__splitter.splitterMoved.connect(self.__splitterMoved) # pylint: disable=no-member self.pluginRegisterSettings([("splitterSize", self.__splitter.sizes, diff --git a/cuegui/cuegui/plugins/MonitorJobsPlugin.py b/cuegui/cuegui/plugins/MonitorJobsPlugin.py index 5f9c5b20e..ee8fea472 100644 --- a/cuegui/cuegui/plugins/MonitorJobsPlugin.py +++ b/cuegui/cuegui/plugins/MonitorJobsPlugin.py @@ -144,11 +144,11 @@ def _regexLoadJobsSetup(self, layout): btn = QtWidgets.QPushButton("Load:") btn.setFocusPolicy(QtCore.Qt.NoFocus) layout.addWidget(btn) - btn.clicked.connect(self._regexLoadJobsHandle) + btn.clicked.connect(self._regexLoadJobsHandle) # pylint: disable=no-member self.__regexLoadJobsEditBox = JobRegexLoadEditBox(self) layout.addWidget(self.__regexLoadJobsEditBox) - self.__regexLoadJobsEditBox.returnPressed.connect(self._regexLoadJobsHandle) + self.__regexLoadJobsEditBox.returnPressed.connect(self._regexLoadJobsHandle) # pylint: disable=no-member def _loadFinishedJobsSetup(self, layout): """Ensures that when querying jobs that finished jobs are included. @@ -157,7 +157,7 @@ def _loadFinishedJobsSetup(self, layout): @type layout: QLayout""" self.__loadFinishedJobsCheckBox = JobLoadFinishedCheckBox(self) layout.addWidget(self.__loadFinishedJobsCheckBox) - self.__loadFinishedJobsCheckBox.stateChanged.connect(self._regexLoadJobsHandle) + self.__loadFinishedJobsCheckBox.stateChanged.connect(self._regexLoadJobsHandle) # pylint: disable=no-member def _regexLoadJobsHandle(self): """This will select all jobs that have a name that contain the substring @@ -184,7 +184,7 @@ def _buttonSetup(self, layout): clearButton.setFocusPolicy(QtCore.Qt.NoFocus) clearButton.setFixedWidth(24) layout.addWidget(clearButton) - clearButton.clicked.connect(self.__regexLoadJobsEditBox.actionClear) + clearButton.clicked.connect(self.__regexLoadJobsEditBox.actionClear) # pylint: disable=no-member spacer = QtWidgets.QWidget() spacer.setFixedWidth(20) @@ -194,7 +194,7 @@ def _buttonSetup(self, layout): mineCheckbox.setFocusPolicy(QtCore.Qt.NoFocus) mineCheckbox.setChecked(True) layout.addWidget(mineCheckbox) - mineCheckbox.stateChanged.connect(self.jobMonitor.setLoadMine) + mineCheckbox.stateChanged.connect(self.jobMonitor.setLoadMine) # pylint: disable=no-member self._loadFinishedJobsSetup(self.__toolbar) @@ -203,56 +203,56 @@ def _buttonSetup(self, layout): finishedButton.setFocusPolicy(QtCore.Qt.NoFocus) finishedButton.setFlat(True) layout.addWidget(finishedButton) - finishedButton.clicked.connect(self.jobMonitor.removeFinishedItems) + finishedButton.clicked.connect(self.jobMonitor.removeFinishedItems) # pylint: disable=no-member allButton = QtWidgets.QPushButton(QtGui.QIcon(":eject.png"), "All") allButton.setToolTip("Unmonitor all jobs") allButton.setFocusPolicy(QtCore.Qt.NoFocus) allButton.setFlat(True) layout.addWidget(allButton) - allButton.clicked.connect(self.jobMonitor.removeAllItems) + allButton.clicked.connect(self.jobMonitor.removeAllItems) # pylint: disable=no-member removeSelectedButton = QtWidgets.QPushButton(QtGui.QIcon(":eject.png"), "") removeSelectedButton.setToolTip("Unmonitor selected jobs") removeSelectedButton.setFocusPolicy(QtCore.Qt.NoFocus) removeSelectedButton.setFlat(True) layout.addWidget(removeSelectedButton) - removeSelectedButton.clicked.connect(self.jobMonitor.actionRemoveSelectedItems) + removeSelectedButton.clicked.connect(self.jobMonitor.actionRemoveSelectedItems) # pylint: disable=no-member eatSelectedButton = QtWidgets.QPushButton(QtGui.QIcon(":eat.png"), "") eatSelectedButton.setToolTip("Eats all dead frames for selected jobs") eatSelectedButton.setFocusPolicy(QtCore.Qt.NoFocus) eatSelectedButton.setFlat(True) layout.addWidget(eatSelectedButton) - eatSelectedButton.clicked.connect(self.jobMonitor.actionEatSelectedItems) + eatSelectedButton.clicked.connect(self.jobMonitor.actionEatSelectedItems) # pylint: disable=no-member retryButton = QtWidgets.QPushButton(QtGui.QIcon(":retry.png"), "") retryButton.setToolTip("Retries all dead frames for selected jobs") retryButton.setFocusPolicy(QtCore.Qt.NoFocus) retryButton.setFlat(True) layout.addWidget(retryButton) - retryButton.clicked.connect(self.jobMonitor.actionRetrySelectedItems) + retryButton.clicked.connect(self.jobMonitor.actionRetrySelectedItems) # pylint: disable=no-member killButton = QtWidgets.QPushButton(QtGui.QIcon(":kill.png"), "") killButton.setToolTip("Kill selected jobs") killButton.setFocusPolicy(QtCore.Qt.NoFocus) killButton.setFlat(True) layout.addWidget(killButton) - killButton.clicked.connect(self.jobMonitor.actionKillSelectedItems) + killButton.clicked.connect(self.jobMonitor.actionKillSelectedItems) # pylint: disable=no-member pauseButton = QtWidgets.QPushButton(QtGui.QIcon(":pause.png"), "") pauseButton.setToolTip("Pause selected jobs") pauseButton.setFocusPolicy(QtCore.Qt.NoFocus) pauseButton.setFlat(True) layout.addWidget(pauseButton) - pauseButton.clicked.connect(self.jobMonitor.actionPauseSelectedItems) + pauseButton.clicked.connect(self.jobMonitor.actionPauseSelectedItems) # pylint: disable=no-member unpauseButton = QtWidgets.QPushButton(QtGui.QIcon(":unpause.png"), "") unpauseButton.setToolTip("Unpause selected jobs") unpauseButton.setFocusPolicy(QtCore.Qt.NoFocus) unpauseButton.setFlat(True) layout.addWidget(unpauseButton) - unpauseButton.clicked.connect(self.jobMonitor.actionResumeSelectedItems) + unpauseButton.clicked.connect(self.jobMonitor.actionResumeSelectedItems) # pylint: disable=no-member class JobLoadFinishedCheckBox(QtWidgets.QCheckBox): @@ -314,7 +314,7 @@ def actionClear(self): self.setText("") def _actionLoad(self): - self.returnPressed.emit() + self.returnPressed.emit() # pylint: disable=no-member def toggleReadOnly(self): """Toggles the textbox readonly setting.""" diff --git a/cuegui/cuegui/plugins/ShowsPlugin.py b/cuegui/cuegui/plugins/ShowsPlugin.py index 5b0b94aad..deda343f9 100644 --- a/cuegui/cuegui/plugins/ShowsPlugin.py +++ b/cuegui/cuegui/plugins/ShowsPlugin.py @@ -43,7 +43,7 @@ def __init__(self, parent): self.__showsWidget = cuegui.ShowsWidget.ShowsWidget(self) self.__createShowButton = QtWidgets.QPushButton("Create Show") self.__createShowButton.setFixedWidth(150) - self.__createShowButton.clicked.connect(self.onCreateShowClicked) + self.__createShowButton.clicked.connect(self.onCreateShowClicked) # pylint: disable=no-member self.layout().addWidget(self.__createShowButton) self.layout().addWidget(self.__showsWidget) diff --git a/cuegui/tests/test_utils.py b/cuegui/tests/test_utils.py index 81f22f6cc..dfcb446db 100644 --- a/cuegui/tests/test_utils.py +++ b/cuegui/tests/test_utils.py @@ -16,6 +16,8 @@ """Common utility functions for CueGUI test code.""" +import PySide2.QtGui + import cuegui.Main @@ -27,3 +29,4 @@ def createApplication(): global __QAPPLICATION_SINGLETON if __QAPPLICATION_SINGLETON is None: __QAPPLICATION_SINGLETON = cuegui.Main.CueGuiApplication() + PySide2.QtGui.qApp = __QAPPLICATION_SINGLETON diff --git a/cuesubmit/cuesubmit/__main__.py b/cuesubmit/cuesubmit/__main__.py index 50c111ab0..3adecc770 100644 --- a/cuesubmit/cuesubmit/__main__.py +++ b/cuesubmit/cuesubmit/__main__.py @@ -23,6 +23,7 @@ from __future__ import absolute_import import sys +from PySide2 import QtGui from PySide2 import QtWidgets from cuesubmit import Constants @@ -65,6 +66,7 @@ def __init__(self, name, *args, **kwargs): def main(): """Entrypoint for the CueSubmit application.""" app = CueSubmitApp(sys.argv) + QtGui.qApp = app app.startup() app.exec_() diff --git a/cuesubmit/cuesubmit/ui/Command.py b/cuesubmit/cuesubmit/ui/Command.py index 6377f2ce3..548e2a836 100644 --- a/cuesubmit/cuesubmit/ui/Command.py +++ b/cuesubmit/cuesubmit/ui/Command.py @@ -39,7 +39,7 @@ def __init__(self, parent=None): def setupConnections(self): """Sets up widget signals.""" - self.commandTextBox.commandBox.textChanged.connect(self.textChanged.emit) + self.commandTextBox.commandBox.textChanged.connect(self.textChanged.emit) # pylint: disable=no-member def setText(self, text): """Set the given text to the command box diff --git a/cuesubmit/cuesubmit/ui/Job.py b/cuesubmit/cuesubmit/ui/Job.py index c9ac15bca..557b972fd 100644 --- a/cuesubmit/cuesubmit/ui/Job.py +++ b/cuesubmit/cuesubmit/ui/Job.py @@ -73,10 +73,12 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" self.table.selectionModel().selectionChanged.connect(self.updateSelection) + # pylint: disable=no-member self.addLayerButton.clicked.connect(self.newLayer) self.deleteLayerButton.clicked.connect(self.removeRow) self.upButton.clicked.connect(self.moveUp) self.downButton.clicked.connect(self.moveDown) + # pylint: enable=no-member def setupButtons(self): """Creates buttons working with job layers.""" diff --git a/cuesubmit/cuesubmit/ui/SettingsWidgets.py b/cuesubmit/cuesubmit/ui/SettingsWidgets.py index 43b7ed7dd..01601265a 100644 --- a/cuesubmit/cuesubmit/ui/SettingsWidgets.py +++ b/cuesubmit/cuesubmit/ui/SettingsWidgets.py @@ -92,7 +92,7 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" - self.mayaFileInput.lineEdit.textChanged.connect(self.dataChanged.emit) + self.mayaFileInput.lineEdit.textChanged.connect(self.dataChanged.emit) # pylint: disable=no-member def setCommandData(self, commandData): self.mayaFileInput.setText(commandData.get('mayaFile', '')) @@ -149,7 +149,7 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" - self.fileInput.lineEdit.textChanged.connect(self.dataChanged.emit) + self.fileInput.lineEdit.textChanged.connect(self.dataChanged.emit) # pylint: disable=no-member def setCommandData(self, commandData): self.fileInput.setText(commandData.get('nukeFile', '')) @@ -214,8 +214,10 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" + # pylint: disable=no-member self.fileInput.lineEdit.textChanged.connect(self.dataChanged.emit) self.outputPath.lineEdit.textChanged.connect(self.dataChanged.emit) + # pylint: enable=no-member def setCommandData(self, commandData): self.fileInput.setText(commandData.get('nukeFile', '')) diff --git a/cuesubmit/cuesubmit/ui/Submit.py b/cuesubmit/cuesubmit/ui/Submit.py index fb0c6de9e..1e0246d17 100644 --- a/cuesubmit/cuesubmit/ui/Submit.py +++ b/cuesubmit/cuesubmit/ui/Submit.py @@ -58,8 +58,10 @@ def __init__(self, parent=None): def setupConnections(self): """Sets up widget signals.""" + # pylint: disable=no-member self.submitButton.pressed.connect(self.submitPressed) self.cancelButton.pressed.connect(self.cancelPressed) + # pylint: enable=no-member def submitPressed(self): """Handler for when submit button has been pressed.""" @@ -222,6 +224,7 @@ def showEvent(self, event): def setupConnections(self): """Sets up widget signals.""" + # pylint: disable=no-member self.submitButtons.cancelled.connect(self.cancel) self.submitButtons.submitted.connect(self.submit) self.jobTreeWidget.selectionChanged.connect(self.jobLayerSelectionChanged) @@ -235,6 +238,7 @@ def setupConnections(self): self.coresInput.lineEdit.textChanged.connect(self.jobDataChanged) self.chunkInput.lineEdit.textChanged.connect(self.jobDataChanged) self.dependSelector.optionsMenu.triggered.connect(self.dependencyChanged) + # pylint: enable=no-member def setupUi(self): """Creates the widget layout.""" diff --git a/cuesubmit/cuesubmit/ui/Widgets.py b/cuesubmit/cuesubmit/ui/Widgets.py index b1b6f0b54..1bcf9b951 100644 --- a/cuesubmit/cuesubmit/ui/Widgets.py +++ b/cuesubmit/cuesubmit/ui/Widgets.py @@ -69,8 +69,10 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" + # pylint: disable=no-member self.lineEdit.textChanged.connect(self.validateText) self.lineEdit.focusChange.connect(self.textFocusChange) + # pylint: enable=no-member def setText(self, text): """Set the text to the given value. @@ -198,7 +200,7 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" - self.optionsMenu.triggered.connect(self.updateLabel) + self.optionsMenu.triggered.connect(self.updateLabel) # pylint: disable=no-member def setOptions(self, options): """Add options to the menu options. @@ -303,12 +305,14 @@ def setupUi(self): def setupConnections(self): """Sets up widget signals.""" + # pylint: disable=no-member self.toggle.valueChanged.connect(self.valueChanged.emit) self.toggle.sliderPressed.connect(self.sliderPressed.emit) self.toggle.sliderMoved.connect(self.sliderMoved.emit) self.toggle.sliderReleased.connect(self.sliderReleased.emit) self.toggle.actionTriggered.connect(self.actionTriggered.emit) self.toggle.rangeChanged.connect(self.rangeChanged.emit) + # pylint: enable=no-member class CueToggle(QtWidgets.QSlider): @@ -326,8 +330,10 @@ def __init__(self, *args, **kwargs): def setupConnections(self): """Sets up widget signals.""" + # pylint: disable=no-member self.valueChanged.connect(self.change) self.sliderPressed.connect(self.toggle) + # pylint: enable=no-member def change(self): """Action when the toggle is dragged.""" @@ -377,7 +383,7 @@ def __init__(self, parent=None): def setupHelpConnections(self): """Sets up widget signal for the help button.""" - self.helpButton.clicked.connect(self.toggleHelp) + self.helpButton.clicked.connect(self.toggleHelp) # pylint: disable=no-member def setHelpText(self): """Set the help text to the widget.""" diff --git a/proto/README.md b/proto/README.md index 154a1d5d7..0b039b462 100644 --- a/proto/README.md +++ b/proto/README.md @@ -14,12 +14,15 @@ To generate: ```sh python -m grpc_tools.protoc -I=. --python_out=../rqd/rqd/compiled_proto --grpc_python_out=../rqd/rqd/compiled_proto ./*.proto +2to3 -wn -f import ../rqd/rqd/compiled_proto/*_pb2*.py ``` For Windows (Powershell): ```powershell python -m grpc_tools.protoc --proto_path=. --python_out=../rqd/rqd/compiled_proto --grpc_python_out=../rqd/rqd/compiled_proto (ls *.proto).Name +cd ..\rqd\rqd\compiled_proto\ +2to3 -wn -f import (ls *_pb2*.py).Name ``` @@ -29,12 +32,15 @@ To generate: ```sh python -m grpc_tools.protoc -I=. --python_out=../pycue/opencue/compiled_proto --grpc_python_out=../pycue/opencue/compiled_proto ./*.proto +2to3 -wn -f import ../pycue/opencue/compiled_proto/*_pb2*.py ``` For Windows (Powershell): ```powershell python -m grpc_tools.protoc --proto_path=. --python_out=../pycue/opencue/compiled_proto --grpc_python_out=../pycue/opencue/compiled_proto (ls *.proto).Name +cd ..\pycue\opencue\compiled_proto\ +2to3 -wn -f import (ls *_pb2*.py).Name ``` diff --git a/requirements.txt b/requirements.txt index f5c9a537f..f1a3a6f42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,10 @@ enum34==1.1.6 future==0.17.1 futures==3.2.0;python_version<"3.0" -grpcio==1.16.0 -grpcio-tools==1.16.0 +grpcio==1.26.0;python_version<"3.0" +grpcio-tools==1.26.0;python_version<"3.0" +grpcio==1.39.0;python_version>="3.0" +grpcio-tools==1.39.0;python_version>="3.0" mock==2.0.0 packaging==20.9 pathlib==1.0.1;python_version<"3.4" diff --git a/requirements_gui.txt b/requirements_gui.txt index 6f35031ad..d9aa53b35 100644 --- a/requirements_gui.txt +++ b/requirements_gui.txt @@ -1 +1 @@ -PySide2==5.11.2 +PySide2==5.15.2