From 659c383c95c38708719cac93b69f9d500015a2f4 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 9 May 2023 17:20:14 +0300 Subject: [PATCH] Updated for package version --- slpkg/dependees.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/slpkg/dependees.py b/slpkg/dependees.py index 318eeb93..ca44a135 100644 --- a/slpkg/dependees.py +++ b/slpkg/dependees.py @@ -24,6 +24,7 @@ class Dependees(Configs): self.llc: str = self.ascii.lower_left_corner self.hl: str = self.ascii.horizontal_line self.var: str = self.ascii.vertical_and_right + self.package_version: str = str() self.is_binary: bool = self.utils.is_binary_repo(repository) @@ -49,19 +50,19 @@ class Dependees(Configs): self.print_dependees(dependees) self.summary_of_dependees(dependees, pkg) - def choose_version(self, name: str) -> str: + def set_the_package_version(self, name: str): if self.is_binary: - version: str = self.data[name][0] + self.package_version: str = self.data[name][0] else: - version: str = self.data[name][2] - return version + self.package_version: str = self.data[name][2] def print_dependees(self, dependees: dict) -> None: for n, (name, requires) in enumerate(dependees.items(), start=1): dependency: str = f'{self.cyan}{name}{self.endc}' if self.option_for_pkg_version: + self.set_the_package_version(name) dependency: str = (f'{self.cyan}{name}{self.endc} {self.yellow}' - f'{self.choose_version(name)}{self.endc}') + f'{self.package_version}{self.endc}') self.print_dependency(n, dependency)