From 579064f45ca3ad9bee546636a8bf748170343466 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 16:51:25 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/PyCQA/flake8: 5.0.4 → 6.1.0](https://github.com/PyCQA/flake8/compare/5.0.4...6.1.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4257e16..fc67bbe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: types: [text] exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$ - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.1.0 hooks: - id: flake8 args: [-j8] From b2da38145bcd87d1a6daa0ffb321d9bffee9c14d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 8 Aug 2023 14:53:56 +0100 Subject: [PATCH 2/2] fix linter errors --- eqt/ui/MainWindowWithSessionManagement.py | 2 +- eqt/ui/UIMultiStepWidget.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eqt/ui/MainWindowWithSessionManagement.py b/eqt/ui/MainWindowWithSessionManagement.py index 9e54d79..75bea8f 100644 --- a/eqt/ui/MainWindowWithSessionManagement.py +++ b/eqt/ui/MainWindowWithSessionManagement.py @@ -499,7 +499,7 @@ def runSaveSessionWorker(self, session_name, compress, event): self.createUnknownProgressWindow(process_name, "Saving", "Saving Session") saveSession_worker = Worker(self.saveSession, session_name, compress) - if type(event) == QCloseEvent: + if isinstance(event, QCloseEvent): saveSession_worker.signals.finished.connect( lambda: self.removeTempAndClose(process_name)) else: diff --git a/eqt/ui/UIMultiStepWidget.py b/eqt/ui/UIMultiStepWidget.py index b5a20a4..f87207b 100644 --- a/eqt/ui/UIMultiStepWidget.py +++ b/eqt/ui/UIMultiStepWidget.py @@ -92,7 +92,7 @@ def addStepWidgets(self, qwidgets, name): self.addStepWidget(qwidget, name) def showHideWidgets(self, widgets, show=True): - if type(widgets) != list: + if not isinstance(widgets, (list, tuple)): widgets = [widgets] for widget in widgets: widget.setVisible(show)