From 55008b8b69c0630b64a5b470ec692fe416a8b294 Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Sun, 17 Sep 2023 12:58:49 -0400 Subject: [PATCH] Placate flake8! Also, some spelling korrections! --- .../widgets/download_collection_progress_box.py | 16 ++++++++-------- lutris/runtime.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lutris/gui/widgets/download_collection_progress_box.py b/lutris/gui/widgets/download_collection_progress_box.py index b521eebb1..06ee00f26 100644 --- a/lutris/gui/widgets/download_collection_progress_box.py +++ b/lutris/gui/widgets/download_collection_progress_box.py @@ -28,7 +28,7 @@ class DownloadCollectionProgressBox(Gtk.Box): self.downloader = downloader self.is_complete = False self._file_queue = file_collection.files_list.copy() - self._file_downlaod = None # file being downloaded + self._file_download = None # file being downloaded self.title = file_collection.human_url self.num_files_downloaded = 0 self.num_files_to_download = file_collection.num_files @@ -82,16 +82,16 @@ class DownloadCollectionProgressBox(Gtk.Box): self.show_all() self.cancel_button.hide() - def update_downlaod_file_label(self, file_name): + def update_download_file_label(self, file_name): """Update file label to file being downloaded""" self.file_name_label.set_text(file_name) def get_new_file_from_queue(self): """Set downloaded file to new file from queue or None if empty""" if self._file_queue: - self._file_downlaod = self._file_queue.pop() + self._file_download = self._file_queue.pop() return - self._file_downlaod = None + self._file_download = None def start(self): """Start downloading a file.""" @@ -100,11 +100,11 @@ class DownloadCollectionProgressBox(Gtk.Box): self.is_complete = True self.emit("complete", {}) return None - if not self._file_downlaod: + if not self._file_download: self.get_new_file_from_queue() self.num_retries = 0 - file = self._file_downlaod - self.update_downlaod_file_label(file.filename) + file = self._file_download + self.update_download_file_label(file.filename) if not self.downloader: try: self.downloader = Downloader(file.url, file.dest_file, referer=file.referer, overwrite=True) @@ -183,7 +183,7 @@ class DownloadCollectionProgressBox(Gtk.Box): self.num_files_downloaded += 1 self.current_size += self.downloader.downloaded_size # set file to None to get next one - self._file_downlaod = None + self._file_download = None self.downloader = None # start the downloader to a new file or finish self.start() diff --git a/lutris/runtime.py b/lutris/runtime.py index 0a10a3404..0f04edf88 100644 --- a/lutris/runtime.py +++ b/lutris/runtime.py @@ -267,7 +267,8 @@ class RuntimeUpdater: if not system.path_exists(runner_base_path) or not os.listdir(runner_base_path): continue - runner_path = os.path.join(settings.RUNNER_DIR, name, "-".join([upstream_runner["version"], upstream_runner["architecture"]])) + runner_path = os.path.join(settings.RUNNER_DIR, name, + "-".join([upstream_runner["version"], upstream_runner["architecture"]])) if system.path_exists(runner_path): continue self.status_text = _(f"Updating {name}") @@ -279,7 +280,6 @@ class RuntimeUpdater: self.status_text = _(f"Extracting {name}") extract_archive(archive_download_path, runner_path) - def percentage_completed(self) -> float: if not self.downloaders: return 0