From 46ff3e5f239b7ebff8ec69a88ff271d6ebfd1694 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 29 Mar 2023 18:09:27 +0300 Subject: [PATCH] Updated for coding style --- slpkg/upgrade.py | 8 ++++---- slpkg/utilities.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 402741c7..8fa98629 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -16,8 +16,8 @@ class Upgrade(Configs): def __init__(self, flags: list, repo='*'): super(Configs, self).__init__() - self.flags = flags - self.repo = repo + self.flags: list = flags + self.repo: str = repo self.utils = Utilities() self.flag_bin_repository: list = ['-B=', '--bin-repo='] @@ -50,7 +50,7 @@ class Upgrade(Configs): yield pkg def is_package_upgradeable(self, package: str) -> bool: - """ Checks if the package is installed and if it is upgradeable, returns true. """ + """ Checks for installed and upgradeable packages. """ installed_version: str = '0' installed = self.utils.is_package_installed(package) inst_build_tag: str = self.utils.split_binary_pkg(installed)[3] @@ -60,7 +60,7 @@ class Upgrade(Configs): repo_package: str = BinQueries(package, self.repo).package_bin() repo_build_tag: str = self.utils.split_binary_pkg(repo_package)[3] else: - repository_version = SBoQueries(package).version() + repository_version: str = SBoQueries(package).version() repo_build_tag: str = self.utils.read_sbo_build_tag(package) if not repo_build_tag: diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 40daf4f8..a86a9502 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -26,8 +26,8 @@ class Utilities: self.bold: str = self.color['bold'] self.yellow: str = self.color['yellow'] self.cyan: str = self.color['cyan'] - self.endc: str = self.color['endc'] self.red: str = self.color['red'] + self.endc: str = self.color['endc'] self.bred: str = f'{self.bold}{self.red}' self.installed_packages: list = list(self.all_installed())