mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Updated for typing
This commit is contained in:
parent
84590f4e3c
commit
601ab8fbef
1 changed files with 7 additions and 7 deletions
|
@ -33,7 +33,7 @@ class RepoInfo(Configs):
|
||||||
self.option_for_repository: bool = self.utils.is_option(
|
self.option_for_repository: bool = self.utils.is_option(
|
||||||
['-o', '--repository='], flags)
|
['-o', '--repository='], flags)
|
||||||
|
|
||||||
def info(self):
|
def info(self) -> None:
|
||||||
""" Prints information about repositories. """
|
""" Prints information about repositories. """
|
||||||
self.view_the_title()
|
self.view_the_title()
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class RepoInfo(Configs):
|
||||||
|
|
||||||
return date[0]
|
return date[0]
|
||||||
|
|
||||||
def view_the_title(self):
|
def view_the_title(self) -> None:
|
||||||
title: str = f'repositories information:'.title()
|
title: str = f'repositories information:'.title()
|
||||||
if self.option_for_repository:
|
if self.option_for_repository:
|
||||||
title: str = f'repository information:'.title()
|
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(f"{'Name:':<{self.name_alignment}}{'Status:':<15}{'Last Updated:':<35}{'Packages:':>12}")
|
||||||
print('=' * self.columns)
|
print('=' * self.columns)
|
||||||
|
|
||||||
def view_the_repository_information(self):
|
def view_the_repository_information(self) -> None:
|
||||||
count: int = 0
|
count: int = 0
|
||||||
color: str = self.red
|
color: str = self.red
|
||||||
status: str = 'Disabled'
|
status: str = 'Disabled'
|
||||||
|
@ -90,7 +90,7 @@ class RepoInfo(Configs):
|
||||||
self.view_the_line_information(self.repository, status, date, count, color)
|
self.view_the_line_information(self.repository, status, date, count, color)
|
||||||
self.view_summary_of_repository()
|
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():
|
for repo, item in self.repos.repositories.items():
|
||||||
count: int = 0
|
count: int = 0
|
||||||
color: str = self.red
|
color: str = self.red
|
||||||
|
@ -106,15 +106,15 @@ class RepoInfo(Configs):
|
||||||
self.view_the_line_information(repo, status, date, count, color)
|
self.view_the_line_information(repo, status, date, count, color)
|
||||||
self.view_summary_of_all_repositories()
|
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}"
|
print(f"{self.cyan}{repository:<{self.name_alignment}}{self.endc}{color}{status:<15}{self.endc}{date:<35}"
|
||||||
f"{self.yellow}{count:>12}{self.endc}")
|
f"{self.yellow}{count:>12}{self.endc}")
|
||||||
|
|
||||||
def view_summary_of_repository(self):
|
def view_summary_of_repository(self) -> None:
|
||||||
print('=' * self.columns)
|
print('=' * self.columns)
|
||||||
print(f"{self.grey}Total {self.total_packages} packages available from the '{self.repository}' repository.\n")
|
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('=' * self.columns)
|
||||||
print(f"{self.grey}Total of {self.enabled}/{len(self.repos.repositories)} "
|
print(f"{self.grey}Total of {self.enabled}/{len(self.repos.repositories)} "
|
||||||
f"repositories are enabled with {self.total_packages} packages available.\n")
|
f"repositories are enabled with {self.total_packages} packages available.\n")
|
||||||
|
|
Loading…
Add table
Reference in a new issue