From ee3b3fb9fead8ee9221fa46f9791d46b9477e8eb Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 2 Jan 2021 06:53:21 +0100 Subject: [PATCH] Fix various typos and some style complaints Closes #175 --- README.md | 4 ++-- legendary/cli.py | 6 +++--- legendary/core.py | 5 ++--- legendary/downloader/manager.py | 2 +- legendary/models/downloading.py | 2 +- legendary/models/manifest.py | 6 +++--- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c5fd0b5..974619c 100644 --- a/README.md +++ b/README.md @@ -493,7 +493,7 @@ Legendary supports some options as well as game specific configuration in `~/.co log_level = debug ; maximum shared memory (in MiB) to use for installation max_memory = 1024 -; maximum number of worker processes when downloading (fewer wokers will be slower, but also use fewer system resources) +; maximum number of worker processes when downloading (fewer workers will be slower, but also use fewer system resources) max_workers = 8 ; default install directory install_dir = /mnt/tank/games @@ -511,7 +511,7 @@ wine_executable = wine ; wine prefix (alternative to using environment variable) wine_prefix = /home/user/.wine -; default environment variables to set (overriden by game specific ones) +; default environment variables to set (overridden by game specific ones) [default.env] WINEPREFIX = /home/user/legendary/.wine diff --git a/legendary/cli.py b/legendary/cli.py index de1345d..bf17aef 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -675,7 +675,7 @@ class LegendaryCLI: except Exception as e: end_t = time.time() logger.info(f'Installation failed after {end_t - start_t:.02f} seconds.') - logger.warning(f'The following exception occured while waiting for the donlowader to finish: {e!r}. ' + logger.warning(f'The following exception occurred while waiting for the downloader to finish: {e!r}. ' f'Try restarting the process, the resume file will be used to start where it failed. ' f'If it continues to fail please open an issue on GitHub.') else: @@ -890,7 +890,7 @@ class LegendaryCLI: f'with legendary. Run "legendary repair {args.app_name}" to do so.') else: logger.info(f'Installation had Epic Games Launcher metadata for version "{igame.version}", ' - f'verification will not be requried.') + f'verification will not be required.') logger.info('Game has been imported.') def egs_sync(self, args): @@ -1151,7 +1151,7 @@ def main(): install_parser.add_argument('--disable-patching', dest='disable_patching', action='store_true', help='Do not attempt to patch existing installation (download entire changed files)') install_parser.add_argument('--download-only', '--no-install', dest='no_install', action='store_true', - help='Do not intall app and do not run prerequisite installers after download') + help='Do not install app and do not run prerequisite installers after download') install_parser.add_argument('--update-only', dest='update_only', action='store_true', help='Only update, do not do anything if specified app is not installed') install_parser.add_argument('--dlm-debug', dest='dlm_debug', action='store_true', diff --git a/legendary/core.py b/legendary/core.py index 9b0225a..ab50656 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -187,7 +187,7 @@ class LegendaryCore: return True def get_assets(self, update_assets=False, platform_override=None) -> List[GameAsset]: - # do not save and always fetch list when platform is overriden + # do not save and always fetch list when platform is overridden if platform_override: return [GameAsset.from_egs_json(a) for a in self.egs.get_game_assets(platform=platform_override)] @@ -999,7 +999,7 @@ class LegendaryCore: if mf and os.path.exists(os.path.join(app_path, '.egstore', mf)): manifest_data = open(os.path.join(app_path, '.egstore', mf), 'rb').read() else: - self.log.warning('.egstore folder exists but manifest file is missing, contiuing as regular import...') + self.log.warning('.egstore folder exists but manifest file is missing, continuing as regular import...') # If there's no in-progress installation assume the game doesn't need to be verified if mf and not os.path.exists(os.path.join(app_path, '.egstore', 'bps')): @@ -1216,4 +1216,3 @@ class LegendaryCore: Do cleanup, config saving, and exit. """ self.lgd.save_config() - diff --git a/legendary/downloader/manager.py b/legendary/downloader/manager.py index 6aa3fc6..0b84d2a 100644 --- a/legendary/downloader/manager.py +++ b/legendary/downloader/manager.py @@ -344,7 +344,7 @@ class DLManager(Process): self.tasks.append(FileTask(current_file.filename + u'.tmp', fopen=True)) self.tasks.extend(chunk_tasks) self.tasks.append(FileTask(current_file.filename + u'.tmp', close=True)) - # delete old file and rename temproary + # delete old file and rename temporary self.tasks.append(FileTask(current_file.filename, delete=True, rename=True, temporary_filename=current_file.filename + u'.tmp')) else: diff --git a/legendary/models/downloading.py b/legendary/models/downloading.py index 7907fd4..b538090 100644 --- a/legendary/models/downloading.py +++ b/legendary/models/downloading.py @@ -97,7 +97,7 @@ class SharedMemorySegment: class ChunkTask: def __init__(self, chunk_guid, chunk_offset=0, chunk_size=0, cleanup=False, chunk_file=None): """ - Download amanger chunk task + Download manager chunk task :param chunk_guid: GUID of chunk :param cleanup: whether or not this chunk can be removed from disk/memory after it has been written diff --git a/legendary/models/manifest.py b/legendary/models/manifest.py index 89b0d9c..8622f18 100644 --- a/legendary/models/manifest.py +++ b/legendary/models/manifest.py @@ -595,9 +595,9 @@ class FileManifest: return ''.format( - self.filename, self.symlink_target, self.hash.hex(), self.flags, - ', '.join(self.install_tags), cp_repr, self.file_size - ) + self.filename, self.symlink_target, self.hash.hex(), self.flags, + ', '.join(self.install_tags), cp_repr, self.file_size + ) class ChunkPart: