Updated for coding style

This commit is contained in:
Dimitris Zlatanidis 2023-03-25 21:04:19 +02:00
parent 1629acd545
commit 8d0dc4ace1
4 changed files with 11 additions and 11 deletions

View file

@ -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:

View file

@ -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):

View file

@ -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():

View file

@ -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()