Renamed methods

This commit is contained in:
Dimitris Zlatanidis 2023-05-13 16:56:59 +03:00
parent d4bd8bd70b
commit 06cf5a4ba4
2 changed files with 11 additions and 10 deletions

View file

@ -47,7 +47,7 @@ class Cleanings(Configs):
LogsDependencies.name, LogsDependencies.requires).all() # type: ignore
if dependencies:
self.view.logs_packages(dependencies)
self.view.logs_dependencies(dependencies)
self.view.question()
self.delete_logs_of_dependencies()
else:

View file

@ -39,7 +39,8 @@ class ViewMessage(Configs):
def build_packages(self, slackbuilds: list, dependencies: list) -> None:
mode: str = 'build'
self.ascii.draw_package_title('The following packages will be build:', 'slpkg build packages')
self.ascii.draw_package_title('The following packages will be build:',
'slpkg build packages')
for slackbuild in slackbuilds:
self.view_build_package(slackbuild)
@ -51,7 +52,7 @@ class ViewMessage(Configs):
for dependency in dependencies:
self.view_build_package(dependency)
self.summary(slackbuilds, dependencies, option=mode)
self.view_summary(slackbuilds, dependencies, option=mode)
def install_upgrade_packages(self, packages: list, dependencies: list, mode: str) -> None:
title: str = 'slpkg install packages'
@ -69,23 +70,23 @@ class ViewMessage(Configs):
for dependency in dependencies:
self.view_install_upgrade_package(dependency)
self.summary(packages, dependencies, option=mode)
self.view_summary(packages, dependencies, option=mode)
def download_packages(self, packages: list, directory: Path) -> None:
mode: str = 'download'
self.download_only: Path = directory
self.ascii.draw_package_title('The following packages will be downloaded:',
'slpkg download packages')
'slpkg download packages')
for package in packages:
self.view_download_package(package)
self.summary(packages, dependencies=[], option=mode)
self.view_summary(packages, dependencies=[], option=mode)
def remove_packages(self, packages: list, dependencies: list) -> Any:
mode: str = 'remove'
self.ascii.draw_package_title('The following packages will be removed:',
'slpkg remove packages')
'slpkg remove packages')
for package in packages:
self.view_remove_package(package)
@ -96,7 +97,7 @@ class ViewMessage(Configs):
for dependency in dependencies:
self.view_remove_package(dependency)
self.summary(packages, dependencies, option=mode)
self.view_summary(packages, dependencies, option=mode)
def view_build_package(self, package: str) -> None:
size: str = str()
@ -156,7 +157,7 @@ class ViewMessage(Configs):
self.ascii.draw_package_line(package, version, size, self.red, repository)
def logs_packages(self, dependencies: list) -> None:
def logs_dependencies(self, dependencies: list) -> None:
print('The following logs will be removed:\n')
for dep in dependencies:
print(f'{self.yellow}{dep[0]}{self.endc}')
@ -164,7 +165,7 @@ class ViewMessage(Configs):
print('Note: After cleaning you should remove them one by one.')
def summary(self, packages: list, dependencies: list, option: str) -> None:
def view_summary(self, packages: list, dependencies: list, option: str) -> None:
packages.extend(dependencies)
summary_message: str = str()
install = upgrade = remove = size_comp = size_uncomp = size_rmv = int()