Updated for coding style

This commit is contained in:
Dimitris Zlatanidis 2023-03-15 19:19:12 +02:00
parent e7e85f1ea0
commit 51b043a945
2 changed files with 6 additions and 7 deletions

View file

@ -14,7 +14,6 @@ class Check(Configs):
def __init__(self):
super(Configs, self).__init__()
self.black = Blacklist()
self.utils = Utilities()
self.color = self.colour()

View file

@ -10,14 +10,14 @@ from slpkg.models.models import session as Session
from slpkg.models.models import SBoTable, PonceTable
class ViewPackage(Configs, Utilities):
class ViewPackage(Configs):
""" View the repository packages. """
def __init__(self, flags: list):
super(Configs, self).__init__()
super(Utilities, self).__init__()
self.flags: list = flags
self.utils = Utilities()
self.session = Session
self.flag_pkg_version: list = ['-p', '--pkg-version']
@ -58,12 +58,12 @@ class ViewPackage(Configs, Utilities):
).filter(self.sbo_table.name == package).first()
path = Path(self.repo_path, info[9], info[0], 'README')
readme = self.read_file(path)
readme = self.utils.read_file(path)
path = Path(self.repo_path, info[9], info[0], f'{info[0]}.info')
info_file = self.read_file(path)
info_file = self.utils.read_file(path)
repo_build_tag = self.read_build_tag(info[0])
repo_build_tag = self.utils.read_build_tag(info[0])
maintainer, email, homepage = '', '', ''
for line in info_file: # type: ignore
@ -76,7 +76,7 @@ class ViewPackage(Configs, Utilities):
deps: str = (', '.join([f'{cyan}{pkg}' for pkg in info[2].split()]))
if self.is_option(self.flag_pkg_version, self.flags):
if self.utils.is_option(self.flag_pkg_version, self.flags):
deps: str = (', '.join([f'{cyan}{pkg}{endc}-{yellow}{SBoQueries(pkg).version()}'
f'{green}' for pkg in info[2].split()]))