From 8d0dc4ace126865b56aaddc9f967e929794302de Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 25 Mar 2023 21:04:19 +0200 Subject: [PATCH] Updated for coding style --- slpkg/binaries/install.py | 10 +++++----- slpkg/binaries/queries.py | 2 +- slpkg/checks.py | 4 ++-- slpkg/views/views.py | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index 4d77300d..bb7cfa57 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -7,7 +7,7 @@ from slpkg.utilities import Utilities from slpkg.downloader import Downloader from slpkg.views.views import ViewMessage from slpkg.repositories import Repositories -from slpkg.binaries.queries import BinsQueries +from slpkg.binaries.queries import BinQueries class Packages(Configs): @@ -38,9 +38,9 @@ class Packages(Configs): pkg_urls: list = [] for pkg in self.packages: - mirror: str = BinsQueries(pkg, self.repo).mirror() - location: str = BinsQueries(pkg, self.repo).location() - package: str = BinsQueries(pkg, self.repo).package_bin() + mirror: str = BinQueries(pkg, self.repo).mirror() + location: str = BinQueries(pkg, self.repo).location() + package: str = BinQueries(pkg, self.repo).package_bin() pkg_urls.append(f'{mirror}{location}/{package}') self.binary_packages.append(package) @@ -57,7 +57,7 @@ class Packages(Configs): """ Packages checksums. """ md5 = Md5sum(self.flags) for package in self.binary_packages: - pkg_checksum: str = BinsQueries(package, self.repo).package_checksum() + pkg_checksum: str = BinQueries(package, self.repo).package_checksum() md5.check(self.tmp_slpkg, package, pkg_checksum) def install_packages(self) -> None: diff --git a/slpkg/binaries/queries.py b/slpkg/binaries/queries.py index 879b52fe..d3b88bf0 100644 --- a/slpkg/binaries/queries.py +++ b/slpkg/binaries/queries.py @@ -8,7 +8,7 @@ from slpkg.models.models import session as Session from slpkg.models.models import BinariesTable -class BinsQueries(Configs): +class BinQueries(Configs): """ Queries class for the sbo repository. """ def __init__(self, name: str, repo=None): diff --git a/slpkg/checks.py b/slpkg/checks.py index 88a3efd9..95bb27d7 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -10,7 +10,7 @@ from slpkg.utilities import Utilities from slpkg.repositories import Repositories from slpkg.models.models import session as Session -from slpkg.binaries.queries import BinsQueries +from slpkg.binaries.queries import BinQueries from slpkg.models.models import SBoTable, PonceTable, BinariesTable @@ -42,7 +42,7 @@ class Check(Configs): for pkg in packages: if self.utils.is_option(self.flag_binary, self.flags): - if not BinsQueries(pkg, repo).package_name(): + if not BinQueries(pkg, repo).package_name(): not_packages.append(pkg) elif not SBoQueries(pkg).slackbuild(): diff --git a/slpkg/views/views.py b/slpkg/views/views.py index b8c48a96..a43fb07a 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -11,7 +11,7 @@ from slpkg.sbos.queries import SBoQueries from slpkg.utilities import Utilities from slpkg.dialog_box import DialogBox from slpkg.repositories import Repositories -from slpkg.binaries.queries import BinsQueries +from slpkg.binaries.queries import BinQueries from slpkg.models.models import LogsDependencies from slpkg.models.models import session as Session @@ -51,8 +51,8 @@ class ViewMessage(Configs): """ Printing the main packages. """ color: str = self.red if self.utils.is_option(self.flag_binary, self.flags): - version: str = BinsQueries(package).version() - repo: str = BinsQueries(package).repository() + version: str = BinQueries(package).version() + repo: str = BinQueries(package).repository() else: version: str = SBoQueries(package).version() repo: str = SBoQueries('').repo_name()