diff --git a/dangerzone/conversion/errors.py b/dangerzone/conversion/errors.py index 6bb5ec1..007caea 100644 --- a/dangerzone/conversion/errors.py +++ b/dangerzone/conversion/errors.py @@ -78,12 +78,12 @@ class MaxPagesException(PagesException): class MaxPageWidthException(PagesException): error_code = ERROR_SHIFT + 44 - error_message = f"A page exceeded the maximum width." + error_message = "A page exceeded the maximum width." class MaxPageHeightException(PagesException): error_code = ERROR_SHIFT + 45 - error_message = f"A page exceeded the maximum height." + error_message = "A page exceeded the maximum height." class PageCountMismatch(PagesException): diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index 9e04e44..acc9b96 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -824,7 +824,7 @@ class SettingsWidget(QtWidgets.QWidget): if n_docs == 1: self.start_button.setText("Convert to Safe Document") - self.docs_selected_label.setText(f"1 document selected") + self.docs_selected_label.setText("1 document selected") else: self.start_button.setText("Convert to Safe Documents") self.docs_selected_label.setText(f"{n_docs} documents selected") diff --git a/dangerzone/gui/updater.py b/dangerzone/gui/updater.py index 58279a8..21bb459 100644 --- a/dangerzone/gui/updater.py +++ b/dangerzone/gui/updater.py @@ -206,7 +206,7 @@ class UpdaterThread(QtCore.QThread): current_time = self._get_now_timestamp() last_check = self.dangerzone.settings.get("updater_last_check") if current_time < last_check + UPDATE_CHECK_COOLDOWN_SECS: - log.debug(f"Cooling down update checks") + log.debug("Cooling down update checks") return True else: return False @@ -255,10 +255,10 @@ class UpdaterThread(QtCore.QThread): previous run. 2. In GitHub, by hitting the latest releases API. """ - log.debug(f"Checking for Dangerzone updates") + log.debug("Checking for Dangerzone updates") latest_version = self.dangerzone.settings.get("updater_latest_version") if version.parse(get_version()) < version.parse(latest_version): - log.debug(f"Determined that there is an update due to cached results") + log.debug("Determined that there is an update due to cached results") return UpdateReport( version=latest_version, changelog=self.dangerzone.settings.get("updater_latest_changelog"), @@ -275,7 +275,7 @@ class UpdaterThread(QtCore.QThread): "updater_last_check", self._get_now_timestamp(), autosave=True ) - log.debug(f"Checking the latest GitHub release") + log.debug("Checking the latest GitHub release") report = self.get_latest_info() log.debug(f"Latest version in GitHub is {report.version}") if report.version and self.can_update(latest_version, report.version): @@ -285,7 +285,7 @@ class UpdaterThread(QtCore.QThread): ) return report - log.debug(f"No need to update") + log.debug("No need to update") return UpdateReport() ################## diff --git a/dev_scripts/upload-asset.py b/dev_scripts/upload-asset.py index cfcc31e..1b7fce9 100755 --- a/dev_scripts/upload-asset.py +++ b/dev_scripts/upload-asset.py @@ -83,16 +83,16 @@ def main(): ) parser.add_argument( "--tag", - help=f"use the release with this tag", + help="use the release with this tag", ) parser.add_argument( "--release-id", - help=f"use the release with this ID", + help="use the release with this ID", ) parser.add_argument( "--draft", action="store_true", - help=f"use the latest draft release", + help="use the latest draft release", ) parser.add_argument( "file", @@ -116,7 +116,7 @@ def main(): elif args.release_id: release_id = args.release_id else: - log.debug(f"Getting the ID of the latest draft release") + log.debug("Getting the ID of the latest draft release") release_id = get_latest_draft_release(token) log.debug(f"The latest draft release has ID '{release_id}'") diff --git a/qubes/dz.ConvertDev b/qubes/dz.ConvertDev index a5b7a5b..31ca897 100755 --- a/qubes/dz.ConvertDev +++ b/qubes/dz.ConvertDev @@ -19,7 +19,7 @@ def main(): # Read the zipfile from stdin zf = sys.stdin.buffer.read(size) if len(zf) < size: - say(f"Client closed the connection early") + say("Client closed the connection early") return 1 with tempfile.NamedTemporaryFile(suffix=".zip") as t: @@ -27,10 +27,11 @@ def main(): t.write(zf) t.flush() - say(f"Importing the conversion module") + say("Importing the conversion module") sys.path.insert(0, t.name) from dangerzone.conversion.doc_to_pixels import main + return asyncio.run(main()) diff --git a/tests/isolation_provider/test_qubes.py b/tests/isolation_provider/test_qubes.py index b05049f..f876369 100644 --- a/tests/isolation_provider/test_qubes.py +++ b/tests/isolation_provider/test_qubes.py @@ -56,7 +56,7 @@ class QubesWait(Qubes): return proc time.sleep(0.1) - raise RuntimeError(f"Disposable qube did not start within 30 seconds") + raise RuntimeError("Disposable qube did not start within 30 seconds") @pytest.fixture