From 460c3538d51f6112fefa82adfeca275dd084b720 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 19 May 2023 17:24:02 +0300 Subject: [PATCH] Updated for length require --- slpkg/tracking.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/slpkg/tracking.py b/slpkg/tracking.py index f03b61c4..3688d101 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -45,9 +45,6 @@ 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 @@ -100,6 +97,8 @@ class Tracking(Configs): def set_package_requires(self, package: str) -> None: self.package_requires: tuple = self.data[package]['requires'].split() + if self.package_requires: + self.require_length: int = max(len(name) for name in self.package_requires) def view_summary_of_tracking(self, package: str) -> None: print(f'\n{self.grey}{self.count_requires} dependencies for {package}{self.endc}\n')