From 601ab8fbef9676442192b8e17b0949bdfe4cbf74 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 13 May 2023 17:57:44 +0300 Subject: [PATCH] Updated for typing --- slpkg/repo_info.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/slpkg/repo_info.py b/slpkg/repo_info.py index 5f270ce8..22819fde 100644 --- a/slpkg/repo_info.py +++ b/slpkg/repo_info.py @@ -33,7 +33,7 @@ class RepoInfo(Configs): self.option_for_repository: bool = self.utils.is_option( ['-o', '--repository='], flags) - def info(self): + def info(self) -> None: """ Prints information about repositories. """ self.view_the_title() @@ -67,7 +67,7 @@ class RepoInfo(Configs): return date[0] - def view_the_title(self): + def view_the_title(self) -> None: title: str = f'repositories information:'.title() if self.option_for_repository: title: str = f'repository information:'.title() @@ -76,7 +76,7 @@ class RepoInfo(Configs): print(f"{'Name:':<{self.name_alignment}}{'Status:':<15}{'Last Updated:':<35}{'Packages:':>12}") print('=' * self.columns) - def view_the_repository_information(self): + def view_the_repository_information(self) -> None: count: int = 0 color: str = self.red status: str = 'Disabled' @@ -90,7 +90,7 @@ class RepoInfo(Configs): self.view_the_line_information(self.repository, status, date, count, color) self.view_summary_of_repository() - def view_the_repositories_information(self): + def view_the_repositories_information(self) -> None: for repo, item in self.repos.repositories.items(): count: int = 0 color: str = self.red @@ -106,15 +106,15 @@ class RepoInfo(Configs): self.view_the_line_information(repo, status, date, count, color) self.view_summary_of_all_repositories() - def view_the_line_information(self, repository: str, status: str, date: str, count: int, color: str): + def view_the_line_information(self, repository: str, status: str, date: str, count: int, color: str) -> None: print(f"{self.cyan}{repository:<{self.name_alignment}}{self.endc}{color}{status:<15}{self.endc}{date:<35}" f"{self.yellow}{count:>12}{self.endc}") - def view_summary_of_repository(self): + def view_summary_of_repository(self) -> None: print('=' * self.columns) print(f"{self.grey}Total {self.total_packages} packages available from the '{self.repository}' repository.\n") - def view_summary_of_all_repositories(self): + def view_summary_of_all_repositories(self) -> None: print('=' * self.columns) print(f"{self.grey}Total of {self.enabled}/{len(self.repos.repositories)} " f"repositories are enabled with {self.total_packages} packages available.\n")