From 6c9cd9d9a62e582e059aafddc12b88c58f9776d4 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 16 May 2023 09:17:37 +0300 Subject: [PATCH] Updated for version alignment --- slpkg/dependees.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slpkg/dependees.py b/slpkg/dependees.py index 1fbb5bfd..79f8cfd2 100644 --- a/slpkg/dependees.py +++ b/slpkg/dependees.py @@ -72,13 +72,14 @@ class Dependees(Configs): print(str_dependency) def view_dependees(self, dependees: dict) -> None: + name_length: int = 0 if dependees: - length: int = max(len(name) for name in dependees.keys()) + name_length: int = max(len(name) for name in dependees.keys()) 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:<{length}}{self.endc} {self.yellow}' + dependency: str = (f'{self.cyan}{name:<{name_length}}{self.endc} {self.yellow}' f'{self.package_version}{self.endc}') self.view_dependency_line(n, dependency)