From 9641a61bb3c48148645ab7b5d381ff24839fe313 Mon Sep 17 00:00:00 2001 From: deeplow Date: Mon, 10 Oct 2022 13:28:21 +0100 Subject: [PATCH] Typing: ignore 'unreachable' lint warning Mypy complains about a line being unreachable. This is probably a false positive. It must assume the code is not using a framework and thus it can't when a PySide 'connect()' is being called. --- dangerzone/gui/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index 2dd7a4e..f70a5d2 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -472,7 +472,7 @@ class SettingsWidget(QtWidgets.QWidget): dialog.setDirectory(os.path.dirname(unconverted_docs[0].input_filename)) else: # open the directory where the user last saved it - dialog.setDirectory(self.output_dir) + dialog.setDirectory(self.output_dir) # type: ignore [unreachable] # allow only the selection of directories dialog.setFileMode(QtWidgets.QFileDialog.DirectoryOnly)