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.
This commit is contained in:
deeplow 2022-10-10 13:28:21 +01:00
parent ce4efc0c25
commit 9641a61bb3
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -472,7 +472,7 @@ class SettingsWidget(QtWidgets.QWidget):
dialog.setDirectory(os.path.dirname(unconverted_docs[0].input_filename)) dialog.setDirectory(os.path.dirname(unconverted_docs[0].input_filename))
else: else:
# open the directory where the user last saved it # 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 # allow only the selection of directories
dialog.setFileMode(QtWidgets.QFileDialog.DirectoryOnly) dialog.setFileMode(QtWidgets.QFileDialog.DirectoryOnly)