Updated docstrings

This commit is contained in:
Dimitris Zlatanidis 2024-05-21 12:28:36 +03:00
parent ab6623bcab
commit efa5a1cf59

View file

@ -14,9 +14,7 @@ from slpkg.views.view_process import ViewProcess
class LoadData(Configs):
""" Reads data form json file and load to dictionary.
"""
"""Reads data form json file and load to dictionary."""
def __init__(self, flags: list = None):
super(Configs, self).__init__()
@ -31,7 +29,7 @@ class LoadData(Configs):
self.view_process = ViewProcess(flags)
def load(self, repository: str, message: bool = True) -> dict:
""" Load data to the dictionary.
"""Load data to the dictionary.
Args:
repository (str): Repository name.
@ -67,8 +65,8 @@ class LoadData(Configs):
return data
def read_data_file(self, file: Path) -> dict:
"""
Read JSON data from the file.
"""Read JSON data from the file.
Args:
file: Path file for reading.
Returns:
@ -88,6 +86,11 @@ class LoadData(Configs):
return json_data
def _remove_blacklist_from_all_repos(self, data: dict) -> dict:
"""Remove blacklist packages from all repositories.
Args:
data: Repository data.
"""
# Remove blacklist packages from keys.
for name, repo in data.items():
blacklist_packages: list = self.utils.ignore_packages(list(data[name].keys()))
@ -107,6 +110,11 @@ class LoadData(Configs):
return data
def _remove_blacklist_from_a_repo(self, data: dict) -> dict:
"""Remove blacklist from a repository.
Args:
data: Repository data.
"""
blacklist_packages: list = self.utils.ignore_packages(list(data.keys()))
# Remove blacklist packages from keys.
for pkg in blacklist_packages: