mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Updated for tracking
This commit is contained in:
parent
2ce3490f5e
commit
1171b5a6c2
1 changed files with 12 additions and 13 deletions
|
@ -34,7 +34,7 @@ class Tracking(Configs):
|
|||
packages: tuple = tuple(self.utils.apply_package_pattern(self.data, self.packages))
|
||||
|
||||
for package in packages:
|
||||
count: int = 0
|
||||
count_requires: int = 0
|
||||
pkg: str = f'{self.yellow}{package}{self.endc}'
|
||||
if self.option_for_pkg_version:
|
||||
pkg = f'{self.yellow}{package} {self.choose_package_version(package)}{self.endc}'
|
||||
|
@ -46,20 +46,19 @@ class Tracking(Configs):
|
|||
|
||||
if not requires:
|
||||
print(f"{'':>1}{self.cyan}No dependencies{self.endc}")
|
||||
else:
|
||||
for n, req in enumerate(requires, start=1):
|
||||
count += 1
|
||||
require: str = f'{self.cyan}{req}{self.endc}'
|
||||
|
||||
if self.option_for_pkg_version:
|
||||
require: str = (f'{self.cyan}{req}{self.endc}'
|
||||
f'{self.choose_dependency_version(req)}')
|
||||
for n, req in enumerate(requires, start=1):
|
||||
count_requires += 1
|
||||
require: str = f'{self.cyan}{req}{self.endc}'
|
||||
if self.option_for_pkg_version:
|
||||
require: str = (f'{self.cyan}{req}{self.endc}'
|
||||
f'{self.choose_dependency_version(req)}')
|
||||
|
||||
self.print_require(n, require)
|
||||
self.summary_of_tracking(count, package)
|
||||
self.print_require(n, require)
|
||||
self.summary_of_tracking(count_requires, package)
|
||||
|
||||
def summary_of_tracking(self, count: int, package: str):
|
||||
print(f'\n{self.grey}{count} dependencies for {package}{self.endc}\n')
|
||||
def summary_of_tracking(self, count_requires: int, package: str):
|
||||
print(f'\n{self.grey}{count_requires} dependencies for {package}{self.endc}\n')
|
||||
|
||||
@staticmethod
|
||||
def print_require(n: int, require: str) -> None:
|
||||
|
@ -76,7 +75,7 @@ class Tracking(Configs):
|
|||
version: str = f"{'':>1}{self.yellow}{self.data[require][0]}{self.endc}"
|
||||
else:
|
||||
version: str = f"{'':>1}{self.yellow}{self.data[require][2]}{self.endc}"
|
||||
except KeyError:
|
||||
except KeyError: # KeyError here because of the '%README%' as dependency
|
||||
version: str = ''
|
||||
return version
|
||||
|
||||
|
|
Loading…
Reference in a new issue