Fixed D401

This commit is contained in:
Dimitris Zlatanidis 2024-05-22 16:36:48 +03:00
parent 56b7bb04c4
commit 5086d950db

View file

@ -36,7 +36,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
('-o', '--repository'), flags)
def info(self) -> None:
"""Prints information about repositories."""
"""Print information about repositories."""
self.load_repo_data()
self.view_the_title()
@ -47,7 +47,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
self.view_the_repositories_information()
def load_repo_data(self) -> None:
"""Loads repository data."""
"""Load repository data."""
self.dates: dict = self.repo_information()
if self.option_for_repository:
self.repo_data: dict = self.load_data.load(self.repository)
@ -55,7 +55,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
self.repo_data: dict = self.load_data.load('*')
def repo_information(self) -> dict:
"""Loads repository information.
"""Load repository information.
Returns:
dict: Description
@ -67,7 +67,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
return {}
def view_the_title(self) -> None:
"""Prints the title."""
"""Print the title."""
title: str = 'repositories information:'.title()
if self.option_for_repository:
title: str = 'repository information:'.title()
@ -77,7 +77,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
print('=' * (self.columns - 1))
def view_the_repository_information(self) -> None:
"""Prints the repository information."""
"""Print the repository information."""
args: dict = {
'repo': self.repository,
'date': 'None',
@ -99,7 +99,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
self.view_summary_of_all_repositories()
def view_the_repositories_information(self) -> None:
"""Prints the repositories information."""
"""Print the repositories information."""
args: dict = {}
for repo, conf in self.repos.repositories.items():
args: dict = {
@ -123,7 +123,7 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
self.view_summary_of_all_repositories()
def view_the_line_information(self, args: dict) -> None:
"""Prints the row of information.
"""Print the row of information.
Args:
args (dict): Arguments for print.
@ -138,12 +138,12 @@ class RepoInfo(Configs): # pylint: disable=[R0902]
f"{self.endc}{args['date']:<34}{self.yellow}{args['count']:>12}{self.endc}")
def view_summary_of_repository(self) -> None:
"""Prints the repository summary."""
"""Print the repository summary."""
print('=' * (self.columns - 1))
print(f"{self.grey}Total {self.total_packages} packages available from the '{self.repository}' repository.\n")
def view_summary_of_all_repositories(self) -> None:
"""Prints the total summary of repositories."""
"""Print the total summary of repositories."""
print('=' * (self.columns - 1))
print(f"{self.grey}Total of {self.enabled}/{len(self.repos.repositories)} "
f"repositories are enabled with {self.total_packages} packages available.\n")