mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for tuples
This commit is contained in:
parent
bf5d286d59
commit
e287efd2c4
15 changed files with 25 additions and 25 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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. """
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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. """
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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. """
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 '
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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())):
|
||||
|
|
|
@ -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. """
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue