Updated for version alignment

This commit is contained in:
Dimitris Zlatanidis 2023-05-16 09:17:37 +03:00
parent 84d50fd196
commit 6c9cd9d9a6

View file

@ -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)