mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-05 08:46:20 +01:00
Fixed for method names
This commit is contained in:
parent
121d8f39c1
commit
6a9de4c917
1 changed files with 13 additions and 13 deletions
|
@ -31,12 +31,12 @@ class RepoInfo(Configs):
|
|||
|
||||
def info(self):
|
||||
""" Prints information about repositories. """
|
||||
self.print_the_title()
|
||||
self.view_the_title()
|
||||
|
||||
if self.option_for_repository:
|
||||
self.print_the_repository_information()
|
||||
self.view_the_repository_information()
|
||||
else:
|
||||
self.print_the_repositories_information()
|
||||
self.view_the_repositories_information()
|
||||
|
||||
def count_the_packages(self, repository: str) -> int:
|
||||
sbo_table: dict = {
|
||||
|
@ -63,7 +63,7 @@ class RepoInfo(Configs):
|
|||
|
||||
return date[0]
|
||||
|
||||
def print_the_title(self):
|
||||
def view_the_title(self):
|
||||
title: str = f'repositories information:'.title()
|
||||
if self.option_for_repository:
|
||||
title: str = f'repository information:'.title()
|
||||
|
@ -72,7 +72,7 @@ class RepoInfo(Configs):
|
|||
print(f"{'Name:':<18}{'Status:':<15}{'Last Updated:':<35}{'Packages:':>12}")
|
||||
print('=' * self.columns)
|
||||
|
||||
def print_the_repository_information(self):
|
||||
def view_the_repository_information(self):
|
||||
count: int = 0
|
||||
color: str = self.red
|
||||
status: str = 'Disabled'
|
||||
|
@ -83,10 +83,10 @@ class RepoInfo(Configs):
|
|||
color: str = self.green
|
||||
count: int = self.count_the_packages(self.repository)
|
||||
|
||||
self.print_the_line_information(self.repository, status, date, count, color)
|
||||
self.print_summary_of_repository()
|
||||
self.view_the_line_information(self.repository, status, date, count, color)
|
||||
self.view_summary_of_repository()
|
||||
|
||||
def print_the_repositories_information(self):
|
||||
def view_the_repositories_information(self):
|
||||
for repo, item in self.repos.repositories.items():
|
||||
count: int = 0
|
||||
color: str = self.red
|
||||
|
@ -99,18 +99,18 @@ class RepoInfo(Configs):
|
|||
color: str = self.green
|
||||
count: int = self.count_the_packages(repo)
|
||||
|
||||
self.print_the_line_information(repo, status, date, count, color)
|
||||
self.print_summary_of_all_repositories()
|
||||
self.view_the_line_information(repo, status, date, count, color)
|
||||
self.view_summary_of_all_repositories()
|
||||
|
||||
def print_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):
|
||||
print(f"{self.cyan}{repository:<18}{self.endc}{color}{status:<15}{self.endc}{date:<35}"
|
||||
f"{self.yellow}{count:>12}{self.endc}")
|
||||
|
||||
def print_summary_of_repository(self):
|
||||
def view_summary_of_repository(self):
|
||||
print('=' * self.columns)
|
||||
print(f"{self.grey}Total {self.total_packages} packages available from the '{self.repository}' repository.\n")
|
||||
|
||||
def print_summary_of_all_repositories(self):
|
||||
def view_summary_of_all_repositories(self):
|
||||
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")
|
||||
|
|
Loading…
Add table
Reference in a new issue