From e287efd2c4a9be8a13e4beb05746dafcc90800a6 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 22 May 2023 22:03:01 +0300 Subject: [PATCH] Updated for tuples --- slpkg/binaries/install.py | 6 +++--- slpkg/check_updates.py | 2 +- slpkg/dependees.py | 4 ++-- slpkg/download_only.py | 2 +- slpkg/downloader.py | 2 +- slpkg/find_installed.py | 2 +- slpkg/multi_process.py | 2 +- slpkg/remove_packages.py | 4 ++-- slpkg/repo_info.py | 2 +- slpkg/sbos/slackbuild.py | 8 ++++---- slpkg/search.py | 2 +- slpkg/tracking.py | 2 +- slpkg/update_repository.py | 4 ++-- slpkg/views/view_package.py | 2 +- slpkg/views/views.py | 6 +++--- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index 0f63f47e..e2fdfe8e 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -44,13 +44,13 @@ class Packages(Configs): self.progress_message: str = f'{self.cyan}Installing{self.endc}' self.option_for_reinstall: bool = self.utils.is_option( - ['-r', '--reinstall'], flags) + ('-r', '--reinstall'), flags) self.option_for_skip_installed: bool = self.utils.is_option( - ['-k', '--skip-installed'], flags) + ('-k', '--skip-installed'), flags) self.option_for_resolve_off: bool = self.utils.is_option( - ['-O', '--resolve-off'], flags) + ('-O', '--resolve-off'), flags) self.packages: list = self.utils.apply_package_pattern(data, packages) diff --git a/slpkg/check_updates.py b/slpkg/check_updates.py index 307bf06a..e61b4749 100644 --- a/slpkg/check_updates.py +++ b/slpkg/check_updates.py @@ -34,7 +34,7 @@ class CheckUpdates(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_repository: bool = self.utils.is_option( - ['-o', '--repository='], flags) + ('-o', '--repository='), flags) logging.basicConfig(filename=LoggingConfig.log_file, filemode=LoggingConfig.filemode, diff --git a/slpkg/dependees.py b/slpkg/dependees.py index c9aa9dea..f02266d2 100644 --- a/slpkg/dependees.py +++ b/slpkg/dependees.py @@ -27,10 +27,10 @@ class Dependees(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_full_reverse: bool = self.utils.is_option( - ['-E', '--full-reverse'], flags) + ('-E', '--full-reverse'), flags) self.option_for_pkg_version: bool = self.utils.is_option( - ['-p', '--pkg-version'], flags) + ('-p', '--pkg-version'), flags) def find(self) -> None: self.view_the_title() diff --git a/slpkg/download_only.py b/slpkg/download_only.py index 98c9c824..9951a49e 100644 --- a/slpkg/download_only.py +++ b/slpkg/download_only.py @@ -39,7 +39,7 @@ class DownloadOnly(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_directory: bool = self.utils.is_option( - ['-z', '--directory='], flags) + ('-z', '--directory='), flags) def packages(self, packages: list) -> None: packages: list = self.utils.apply_package_pattern(self.data, packages) diff --git a/slpkg/downloader.py b/slpkg/downloader.py index a5ceb2dc..00f62671 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -32,7 +32,7 @@ class Downloader(Configs): 'lftp': self.lftp_downloader } self.option_for_parallel: bool = self.utils.is_option( - ['-P', '--parallel'], flags) + ('-P', '--parallel'), flags) def download(self) -> None: """ Starting the processing for downloading. """ diff --git a/slpkg/find_installed.py b/slpkg/find_installed.py index 852dfe44..25ef6d90 100644 --- a/slpkg/find_installed.py +++ b/slpkg/find_installed.py @@ -16,7 +16,7 @@ class FindInstalled(Configs): self.matching: list = [] self.option_for_no_case: bool = self.utils.is_option( - ['-m', '--no-case'], flags) + ('-m', '--no-case'), flags) def find(self) -> None: self.view_title() diff --git a/slpkg/multi_process.py b/slpkg/multi_process.py index cd686e77..af54db51 100644 --- a/slpkg/multi_process.py +++ b/slpkg/multi_process.py @@ -23,7 +23,7 @@ class MultiProcess(Configs): self.stdout = None self.option_for_no_silent: bool = self.utils.is_option( - ['-n', '--no-silent'], flags) + ('-n', '--no-silent'), flags) def process(self, command: str, filename: str, progress_message: str) -> None: """ Starting multiprocessing install/upgrade process. """ diff --git a/slpkg/remove_packages.py b/slpkg/remove_packages.py index e3f87f48..c1b29137 100644 --- a/slpkg/remove_packages.py +++ b/slpkg/remove_packages.py @@ -38,10 +38,10 @@ class RemovePackages(Configs): self.hl: str = self.ascii.horizontal_line self.option_for_resolve_off: bool = self.utils.is_option( - ['-O', '--resolve-off'], flags) + ('-O', '--resolve-off'), flags) self.option_for_yes: bool = self.utils.is_option( - ['-y', '--yes'], flags) + ('-y', '--yes'), flags) def remove(self) -> None: self.query_logs_dependencies() diff --git a/slpkg/repo_info.py b/slpkg/repo_info.py index c2a4ae9d..8a989096 100644 --- a/slpkg/repo_info.py +++ b/slpkg/repo_info.py @@ -31,7 +31,7 @@ class RepoInfo(Configs): self.total_packages: int = 0 self.option_for_repository: bool = self.utils.is_option( - ['-o', '--repository='], flags) + ('-o', '--repository='), flags) def info(self) -> None: """ Prints information about repositories. """ diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index 95ccc271..c6491e9d 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -54,16 +54,16 @@ class Slackbuilds(Configs): self.progress_message: str = f'{self.cyan}Installing{self.endc}' self.option_for_reinstall: bool = self.utils.is_option( - ['-r', '--reinstall'], flags) + ('-r', '--reinstall'), flags) self.option_for_skip_installed: bool = self.utils.is_option( - ['-k', '--skip-installed'], flags) + ('-k', '--skip-installed'), flags) self.option_for_resolve_off: bool = self.utils.is_option( - ['-O', '--resolve-off'], flags) + ('-O', '--resolve-off'), flags) self.option_for_jobs: bool = self.utils.is_option( - ['-j', '--jobs'], flags) + ('-j', '--jobs'), flags) self.slackbuilds: list = self.utils.apply_package_pattern(data, slackbuilds) diff --git a/slpkg/search.py b/slpkg/search.py index 0be78dde..4fe2e051 100644 --- a/slpkg/search.py +++ b/slpkg/search.py @@ -26,7 +26,7 @@ class SearchPackage(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_no_case: bool = self.utils.is_option( - ['-m', '--no-case'], flags) + ('-m', '--no-case'), flags) def search(self) -> None: print(f'The list below shows the repo ' diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 3688d101..e66225f0 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -32,7 +32,7 @@ class Tracking(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_pkg_version: bool = self.utils.is_option( - ['-p', '--pkg-version'], flags) + ('-p', '--pkg-version'), flags) def package(self) -> None: self.view_the_title() diff --git a/slpkg/update_repository.py b/slpkg/update_repository.py index 605c9676..f37d2815 100644 --- a/slpkg/update_repository.py +++ b/slpkg/update_repository.py @@ -42,10 +42,10 @@ class UpdateRepository(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_repository: bool = self.utils.is_option( - ['-o', '--repository='], flags) + ('-o', '--repository='), flags) self.option_for_install_data: bool = self.utils.is_option( - ['-a', '--install-data'], flags) + ('-a', '--install-data'), flags) def update_the_repositories(self) -> None: if not any(list(self.repos_for_update.values())): diff --git a/slpkg/views/view_package.py b/slpkg/views/view_package.py index b36b4ba6..1a5eb92e 100644 --- a/slpkg/views/view_package.py +++ b/slpkg/views/view_package.py @@ -31,7 +31,7 @@ class ViewPackage(Configs): self.repo_tar_suffix: str = str() self.option_for_pkg_version: bool = self.utils.is_option( - ['-p', '--pkg-version'], flags) + ('-p', '--pkg-version'), flags) def slackbuild(self, data: dict, slackbuilds: list) -> None: """ View slackbuild packages information. """ diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 5ba066e6..215407f6 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -32,13 +32,13 @@ class ViewMessage(Configs): self.is_binary: bool = self.utils.is_binary_repo(repository) self.option_for_resolve_off: bool = self.utils.is_option( - ['-O', '--resolve-off'], flags) + ('-O', '--resolve-off'), flags) self.option_for_reinstall: bool = self.utils.is_option( - ['-r', '--reinstall'], flags) + ('-r', '--reinstall'), flags) self.option_for_yes: bool = self.utils.is_option( - ['-y', '--yes'], flags) + ('-y', '--yes'), flags) def build_packages(self, slackbuilds: list, dependencies: list) -> None: mode: str = 'build'