diff --git a/slpkg/dependees.py b/slpkg/dependees.py index ab38b948..e4fc1084 100644 --- a/slpkg/dependees.py +++ b/slpkg/dependees.py @@ -50,7 +50,7 @@ class Dependees(Configs): if self.utils.is_option(self.flag_bin_repository, self.flags): self.bin_repo_dict: dict = BinQueries(repo).repository_data() else: - self.sbo_repo_dict: dict = SBoQueries('').repository_data() + self.sbo_repo_dict: dict = SBoQueries().repository_data() for pkg in self.packages: dependees: list = list(self.find_requires(pkg)) diff --git a/slpkg/download_only.py b/slpkg/download_only.py index 1d5e33e4..7f15ebe9 100644 --- a/slpkg/download_only.py +++ b/slpkg/download_only.py @@ -53,7 +53,7 @@ class Download(Configs): location: str = bin_repo_dict[pkg][3] urls.append(f'{mirror}{location}/{package}') else: - sbo_repo_dict: dict = SBoQueries('').repository_data() + sbo_repo_dict: dict = SBoQueries().repository_data() location: str = sbo_repo_dict[pkg][0] if self.os_arch == 'x86_64' and sbo_repo_dict[pkg][4]: sources = sbo_repo_dict[pkg][4].split() diff --git a/slpkg/main.py b/slpkg/main.py index 60dab517..21f4a7a9 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -288,7 +288,7 @@ class Argparse(Configs): if self.utils.is_option(self.flag_binaries, self.flags): self.bin_repo_dict: dict = BinQueries(self.binary_repo).repository_data() else: - self.sbo_repo_dict: dict = SBoQueries('').repository_data() + self.sbo_repo_dict: dict = SBoQueries().repository_data() self.check = Check(self.flags, self.sbo_repo_dict, self.bin_repo_dict) self.check.is_blacklist(self.args[1:]) diff --git a/slpkg/repo_info.py b/slpkg/repo_info.py index bc3d85a5..d9d87433 100644 --- a/slpkg/repo_info.py +++ b/slpkg/repo_info.py @@ -61,7 +61,7 @@ class RepoInfo(Configs): if value[0]: if repo in [self.repos.sbo_repo_name, self.repos.ponce_repo_name]: - count = int(SBoQueries('').count_packages()) + count = int(SBoQueries().count_packages()) else: count = int(BinQueries(repo).count_packages()) diff --git a/slpkg/sbos/dependencies.py b/slpkg/sbos/dependencies.py index bf12160c..a214795e 100644 --- a/slpkg/sbos/dependencies.py +++ b/slpkg/sbos/dependencies.py @@ -11,7 +11,7 @@ class Requires: def __init__(self, name: str): __slots__ = 'name' self.name: str = name - self.sbo_repo_dict: dict = SBoQueries('').repository_data() + self.sbo_repo_dict: dict = SBoQueries().repository_data() def resolve(self) -> list: """ Resolve the dependencies. """ diff --git a/slpkg/sbos/queries.py b/slpkg/sbos/queries.py index e7796bf8..42acbde1 100644 --- a/slpkg/sbos/queries.py +++ b/slpkg/sbos/queries.py @@ -13,7 +13,7 @@ from slpkg.models.models import SBoTable, PonceTable class SBoQueries(Configs): """ Queries class for the sbo repository. """ - def __init__(self, name: str): + def __init__(self, name=None): __slots__ = 'name' super(Configs, self).__init__() self.name: str = name diff --git a/slpkg/search.py b/slpkg/search.py index 3f9a1d74..59023547 100644 --- a/slpkg/search.py +++ b/slpkg/search.py @@ -67,7 +67,7 @@ class SearchPackage(Configs): else: # Searching for slackbuilds. - sbo_repos_dict: dict = SBoQueries('').repository_data() + sbo_repos_dict: dict = SBoQueries().repository_data() names: list = list(sbo_repos_dict.keys()) for package in packages: for name in names: diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 738ec6c3..3f88d712 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -41,7 +41,7 @@ class Tracking(Configs): if self.utils.is_option(self.flag_bin_repository, self.flags): bin_repo_dict: dict = BinQueries(repo).repository_data() else: - sbo_repo_dict: dict = SBoQueries('').repository_data() + sbo_repo_dict: dict = SBoQueries().repository_data() char: str = f' {self.llc}{self.hl}' sp: str = ' ' * 4 diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index aa716b3d..8cd65cd1 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -32,7 +32,7 @@ class Upgrade(Configs): if self.repo_for_binaries: self.bin_repo_dict: dict = BinQueries(self.repo).repository_data() else: - self.sbo_repo_dict: dict = SBoQueries('').repository_data() + self.sbo_repo_dict: dict = SBoQueries().repository_data() logging.basicConfig(filename=str(LoggingConfig.log_file), filemode='w', diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 5857994c..80ff3536 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -113,7 +113,7 @@ class Utilities: def read_sbo_build_tag(self, sbo: str) -> str: """ Returns build tag from .SlackBuild file. """ build: str = '' - sbo_repo_dict: dict = SBoQueries('').repository_data() + sbo_repo_dict: dict = SBoQueries().repository_data() location: str = sbo_repo_dict[sbo][0] sbo_script = Path(self.repos.sbo_repo_path, location, sbo, f'{sbo}.SlackBuild') @@ -202,7 +202,7 @@ class Utilities: bin_repo_dict: dict = BinQueries(repo).repository_data() packages += list(bin_repo_dict.keys()) else: - sbo_repo_dict: dict = SBoQueries('').repository_data() + sbo_repo_dict: dict = SBoQueries().repository_data() packages += list(sbo_repo_dict.keys()) return packages diff --git a/slpkg/views/view_package.py b/slpkg/views/view_package.py index 0a8a7e2c..ac922d8a 100644 --- a/slpkg/views/view_package.py +++ b/slpkg/views/view_package.py @@ -49,7 +49,7 @@ class ViewPackage(Configs): def slackbuild(self, slackbuilds: list) -> None: """ View the packages from the repository. """ slackbuilds: list = self.utils.apply_package_pattern(self.flags, slackbuilds) - sbo_repo_dict: dict = SBoQueries('').repository_data() + sbo_repo_dict: dict = SBoQueries().repository_data() for sbo in slackbuilds: diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 4847b26b..85cd8d4e 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -49,7 +49,7 @@ class ViewMessage(Configs): if self.utils.is_option(self.flag_bin_repository, flags): self.bin_repo_dict: dict = BinQueries(self.repo).repository_data() else: - self.sbo_repo_dict: dict = SBoQueries('').repository_data() + self.sbo_repo_dict: dict = SBoQueries().repository_data() def view_packages(self, package: str, mode: str) -> None: """ Printing the main packages. """ @@ -62,7 +62,7 @@ class ViewMessage(Configs): repo: str = self.repo else: version: str = self.sbo_repo_dict[package][2] - repo: str = SBoQueries('').repo_name() + repo: str = SBoQueries().repo_name() if mode in ['install', 'download']: color: str = self.cyan