Fixed code

This commit is contained in:
Dimitris Zlatanidis 2022-12-22 23:00:42 +02:00
parent f23af079bd
commit 94153d5eca
4 changed files with 6 additions and 6 deletions

View file

@ -11,10 +11,10 @@ from slpkg.configs import Configs
class Blacklist:
""" Reads and returns the blacklist. """
def __init__(self) -> list:
def __init__(self):
self.configs = Configs
def get(self):
def get(self) -> list:
""" Reads the blacklist file. """
file = f'{self.configs.etc_path}/blacklist.toml'
if os.path.isfile(file):

View file

@ -78,7 +78,7 @@ class SBoQueries:
return ''
def checksum(self) -> str:
""" Returns the source checkcum. """
""" Returns the source checksum. """
md5sum, md5sum64, = [], []
mds5, md5s64 = self.session.query(
SBoTable.md5sum, SBoTable.md5sum64).filter(
@ -113,7 +113,7 @@ class SBoQueries:
return files[0]
return ''
def _chose_arch(self, arch: str, arch64: str) -> str:
def _chose_arch(self, arch: list, arch64: list) -> str:
""" Choosing the right arch. """
if self.configs.os_arch == 'x86_64' and arch64:
return arch64

View file

@ -24,7 +24,7 @@ class UpdateRepository:
def sbo(self):
""" Updated the sbo repository. """
view = ViewMessage('')
view = ViewMessage([])
check_updates = CheckUpdates()
if not check_updates.check():

View file

@ -11,7 +11,7 @@ class TestPkgInstalled(unittest.TestCase):
def test_check_exists(self):
self.assertIsNone(self.check.exists(self.packages))
def tect_check_unsupported(self):
def test_check_unsupported(self):
self.assertIsNone(self.check.unsupported(self.packages))
def test_check_installed(self):