Updated for coding style

This commit is contained in:
Dimitris Zlatanidis 2023-04-27 21:17:16 +03:00
parent 297552cf91
commit 794150293b

View file

@ -51,7 +51,8 @@ class Check(Configs):
not_packages.append(pkg)
if not_packages:
self.errors.raise_error_message(f"Packages '{', '.join(not_packages)}' does not exists", exit_status=1)
self.errors.raise_error_message(f"Packages '{', '.join(not_packages)}' does not exists",
exit_status=1)
def is_package_unsupported(self, slackbuilds: list) -> None:
""" Checking for unsupported slackbuilds. """
@ -63,7 +64,8 @@ class Check(Configs):
sources: list = self.data[sbo][3].split()
if 'UNSUPPORTED' in sources:
self.errors.raise_error_message(f"Package '{sbo}' unsupported by arch", exit_status=1)
self.errors.raise_error_message(f"Package '{sbo}' unsupported by arch",
exit_status=1)
def is_installed(self, packages: list) -> None:
""" Checking for installed packages. """
@ -75,7 +77,8 @@ class Check(Configs):
not_found.append(pkg)
if not_found:
self.errors.raise_error_message(f'Not found \'{", ".join(not_found)}\' installed packages', exit_status=1)
self.errors.raise_error_message(f'Not found \'{", ".join(not_found)}\' installed packages',
exit_status=1)
def is_empty_database(self, repo: str) -> None:
""" Checking for empty table and database file. """
@ -89,4 +92,5 @@ class Check(Configs):
if not self.session.query(self.repo_table).first() or not db.is_file() or count == 0:
self.errors.raise_error_message("You need to update the package lists first, run:\n\n"
" $ slpkg update\n"
" $ slpkg update --bin-repo='*' for binaries", exit_status=1)
" $ slpkg update --bin-repo='*' for binaries",
exit_status=1)