mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
Updated the print method
This commit is contained in:
parent
25fe8a3949
commit
f5ae68d6cc
1 changed files with 2 additions and 5 deletions
|
@ -30,6 +30,7 @@ class ViewPackage:
|
|||
red = color['red']
|
||||
endc = color['endc']
|
||||
|
||||
print(end='\rCollecting the data... ')
|
||||
for package in packages:
|
||||
|
||||
dependees = " ".join(list(self.dependees(package)))
|
||||
|
@ -62,7 +63,7 @@ class ViewPackage:
|
|||
|
||||
deps = (', '.join([f'{pkg} ({SBoQueries(pkg).version()})' for pkg in info[2].split()]))
|
||||
|
||||
print(f'Name: {green}{info[0]}{endc}\n'
|
||||
print(f'\n\nName: {green}{info[0]}{endc}\n'
|
||||
f'Version: {green}{info[1]}{endc}\n'
|
||||
f'Requires: {green}{deps}{endc}\n'
|
||||
f'Dependees: {green}{dependees}{endc}\n'
|
||||
|
@ -85,16 +86,12 @@ class ViewPackage:
|
|||
def dependees(self, name):
|
||||
""" Collecting the dependees. """
|
||||
if '--dependees' in self.flags:
|
||||
print(end='\rCollecting the data... ')
|
||||
sbos = SBoQueries(name).names()
|
||||
for sbo in sbos:
|
||||
requires = SBoQueries(sbo).requires()
|
||||
if name in requires:
|
||||
version = SBoQueries(sbo).version()
|
||||
yield f'{sbo} ({version})'
|
||||
print('\n')
|
||||
else:
|
||||
return ''
|
||||
|
||||
@staticmethod
|
||||
def http_request(link):
|
||||
|
|
Loading…
Reference in a new issue