Updated for require length

This commit is contained in:
Dimitris Zlatanidis 2023-05-19 14:52:17 +03:00
parent 28ba2e534e
commit f5cf5e3fd9

View file

@ -27,6 +27,7 @@ class Tracking(Configs):
self.package_line: str = str()
self.require_line: str = str()
self.count_requires: int = 0
self.require_length: int = 0
self.is_binary: bool = self.utils.is_binary_repo(repository)
@ -44,6 +45,9 @@ class Tracking(Configs):
self.view_the_main_package()
self.view_no_dependencies()
if self.package_requires:
self.require_length: int = max(len(name) for name in self.package_requires)
for require in self.package_requires:
self.count_requires += 1
@ -80,7 +84,7 @@ class Tracking(Configs):
self.require_line: str = f'{self.cyan}{require}{self.endc}'
if self.option_for_pkg_version:
self.set_package_dependency_version(require)
self.require_line: str = (f'{self.cyan}{require}{self.endc}'
self.require_line: str = (f'{self.cyan}{require:<{self.require_length}}{self.endc}'
f'{self.package_dependency_version}')
def set_package_dependency_version(self, require: str) -> None: