mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for type hinting
This commit is contained in:
parent
6d6605ea15
commit
4f28a75c92
1 changed files with 8 additions and 8 deletions
|
@ -54,11 +54,11 @@ class ViewMessage(Configs):
|
|||
|
||||
self.ascii.draw_view_package(package, version, color)
|
||||
|
||||
def view_skipping_packages(self, sbo: str, version: str):
|
||||
def view_skipping_packages(self, sbo: str, version: str) -> None:
|
||||
""" Print the skipping packages. """
|
||||
print(f'[{self.yellow}Skipping{self.endc}] {sbo}-{version} {self.red}(already installed){self.endc}')
|
||||
|
||||
def build_packages(self, slackbuilds: list, dependencies: list):
|
||||
def build_packages(self, slackbuilds: list, dependencies: list) -> None:
|
||||
""" View packages for build only. """
|
||||
self.ascii.draw_package_title_box('The following packages will be build:', 'Build Packages')
|
||||
|
||||
|
@ -76,7 +76,7 @@ class ViewMessage(Configs):
|
|||
|
||||
self.summary(slackbuilds, dependencies, option='build')
|
||||
|
||||
def install_packages(self, slackbuilds: list, dependencies: list, mode: str):
|
||||
def install_packages(self, slackbuilds: list, dependencies: list, mode: str) -> None:
|
||||
""" View packages for install. """
|
||||
title: str = 'Install Packages'
|
||||
if mode == 'upgrade':
|
||||
|
@ -98,7 +98,7 @@ class ViewMessage(Configs):
|
|||
|
||||
self.summary(slackbuilds, dependencies, option=mode)
|
||||
|
||||
def download_packages(self, slackbuilds: list, directory: str):
|
||||
def download_packages(self, slackbuilds: list, directory: str) -> None:
|
||||
""" View downloaded packages. """
|
||||
self.ascii.draw_package_title_box('The following packages will be downloaded:', 'Download Packages')
|
||||
|
||||
|
@ -149,7 +149,7 @@ class ViewMessage(Configs):
|
|||
|
||||
return self.installed_packages, dependencies
|
||||
|
||||
def _view_removed(self, name: str):
|
||||
def _view_removed(self, name: str) -> None:
|
||||
""" View and creates list with packages for remove. """
|
||||
installed = self.utils.all_installed(self.file_pattern)
|
||||
|
||||
|
@ -183,7 +183,7 @@ class ViewMessage(Configs):
|
|||
os.system('clear')
|
||||
return tags
|
||||
|
||||
def summary(self, slackbuilds: list, dependencies: list, option: str):
|
||||
def summary(self, slackbuilds: list, dependencies: list, option: str) -> None:
|
||||
""" View the status of the packages action. """
|
||||
slackbuilds.extend(dependencies)
|
||||
install = upgrade = remove = 0
|
||||
|
@ -219,7 +219,7 @@ class ViewMessage(Configs):
|
|||
print(f'{self.grey}{len(slackbuilds)} packages '
|
||||
f'will be downloaded in {self.download_only} folder.{self.endc}')
|
||||
|
||||
def logs_packages(self, dependencies: list):
|
||||
def logs_packages(self, dependencies: list) -> None:
|
||||
""" View the logging packages. """
|
||||
print('The following logs will be removed:\n')
|
||||
|
||||
|
@ -229,7 +229,7 @@ class ViewMessage(Configs):
|
|||
|
||||
print('Note: After cleaning you should remove them one by one.')
|
||||
|
||||
def question(self):
|
||||
def question(self) -> None:
|
||||
""" Manage to proceed. """
|
||||
if not self.utils.is_option(self.flag_yes, self.flags):
|
||||
answer: str = input('\nDo you want to continue? [y/N] ')
|
||||
|
|
Loading…
Reference in a new issue