mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Updated for coding style
This commit is contained in:
parent
0c64f14329
commit
5900a24966
1 changed files with 5 additions and 6 deletions
|
@ -31,7 +31,7 @@ class View(Configs):
|
|||
self.sum_remove = 0
|
||||
self.sum_size_comp = 0
|
||||
self.sum_size_uncomp = 0
|
||||
self.sum_size_rmv = 0
|
||||
self.sum_size_remove = 0
|
||||
|
||||
self.download_only = None
|
||||
self.summary_message: str = ''
|
||||
|
@ -117,7 +117,7 @@ class View(Configs):
|
|||
self.summary(dependency, mode)
|
||||
|
||||
self.ascii.draw_bottom_line()
|
||||
self.set_summary_for_remove(self.sum_remove, self.sum_size_rmv)
|
||||
self.set_summary_for_remove(self.sum_remove, self.sum_size_remove)
|
||||
print(self.summary_message)
|
||||
|
||||
def build_package(self, package: str) -> None:
|
||||
|
@ -180,7 +180,7 @@ class View(Configs):
|
|||
self.sum_size_uncomp += float(self.data[package]['size_uncomp']) * 1024
|
||||
|
||||
if installed and option == 'remove':
|
||||
self.sum_size_rmv += self.utils.count_file_size(package)
|
||||
self.sum_size_remove += self.utils.count_file_size(package)
|
||||
|
||||
upgradeable: bool = False
|
||||
if option != 'remove':
|
||||
|
@ -205,7 +205,7 @@ class View(Configs):
|
|||
f'{self.grey}Total {install} packages will be '
|
||||
f'installed and {upgrade} will be upgraded, and total '
|
||||
f'{self.utils.convert_file_sizes(size_comp)} will be downloaded and '
|
||||
f'{self.utils.convert_file_sizes(size_uncomp)} will be installed.{self.endc} ')
|
||||
f'{self.utils.convert_file_sizes(size_uncomp)} will be installed.{self.endc}')
|
||||
|
||||
def set_summary_for_remove(self, remove: int, size_rmv: int) -> None:
|
||||
self.summary_message: str = (
|
||||
|
@ -216,8 +216,7 @@ class View(Configs):
|
|||
def set_summary_for_download(self, packages: list, size_comp: int) -> None:
|
||||
self.summary_message: str = (
|
||||
f'{self.grey}Total {len(packages)} packages and {self.utils.convert_file_sizes(size_comp)} '
|
||||
f'will be downloaded in {self.download_only} folder.{self.endc}'
|
||||
)
|
||||
f'will be downloaded in {self.download_only} folder.{self.endc}')
|
||||
|
||||
def build_package_and_version(self, package: str) -> str:
|
||||
installed_package: str = self.utils.is_package_installed(package)
|
||||
|
|
Loading…
Reference in a new issue