Fixed for D400,D401,D205

This commit is contained in:
Dimitris Zlatanidis 2024-05-22 13:02:18 +03:00
parent cbf0c629fd
commit fbf296042a

View file

@ -27,7 +27,7 @@ class Utilities(Configs):
self.errors = Errors()
def is_package_installed(self, name: str) -> str:
"""Returns the installed package binary.
"""Return the installed package binary.
Args:
name (str): Package name.
@ -78,7 +78,7 @@ class Utilities(Configs):
@staticmethod
def remove_folder_if_exists(folder: Path) -> None:
"""Removes the folder if exist.
"""Remove the folder if exist.
Args:
folder (Path): Path to the folder.
@ -88,7 +88,7 @@ class Utilities(Configs):
@staticmethod
def create_directory(directory: Path) -> None:
"""Creates folder like mkdir -p.
"""Create folder like mkdir -p.
Args:
directory (Path): Path to folder.
@ -98,7 +98,7 @@ class Utilities(Configs):
@staticmethod
def split_package(package: str) -> dict:
"""Splits the binary package name in name, version, arch, build and tag.
"""Split the binary package name in name, version, arch, build and tag.
Args:
package (str): Full package name for spliting.
@ -123,7 +123,7 @@ class Utilities(Configs):
@staticmethod
def finished_time(elapsed_time: float) -> None:
"""Printing the elapsed time.
"""Print the elapsed time.
Args:
elapsed_time (float): Unformatted time.
@ -132,7 +132,7 @@ class Utilities(Configs):
@staticmethod
def is_option(options: tuple, flags: list) -> bool:
"""Returns True if option applied.
"""Return True if option applied.
Args:
options (tuple): Options for checking.
@ -147,7 +147,7 @@ class Utilities(Configs):
return False
def read_packages_from_file(self, file: Path) -> Generator:
"""Reads name packages from file.
"""Read packages from file.
Args:
file (Path): Path to the file.
@ -168,7 +168,7 @@ class Utilities(Configs):
self.errors.raise_error_message(f"No such file or directory: '{file}'", exit_status=20)
def read_text_file(self, file: Path) -> list:
"""Reads a text file.
"""Read a text file.
Args:
file (Path): Path to the file.
@ -184,8 +184,10 @@ class Utilities(Configs):
return []
def count_file_size(self, name: str) -> int:
"""Read the contents files from the package file list
the count the total installation file size in bytes.
"""Count the file size.
Read the contents files from the package file list
and count the total installation file size in bytes.
Args:
name: The name of the package.
@ -243,7 +245,7 @@ class Utilities(Configs):
@staticmethod
def change_owner_privileges(folder: Path) -> None:
"""Changes the owner privileges.
"""Change the owner privileges.
Args:
folder (Path): Path to the folder.
@ -291,7 +293,7 @@ class Utilities(Configs):
return json_data
def ignore_packages(self, packages: list) -> list:
"""Matching packages using regular expression.
"""Match packages using regular expression.
Args:
packages: The packages to apply the pattern.
@ -306,7 +308,7 @@ class Utilities(Configs):
return matching_packages
def convert_dict_keys_to_lower(self, d: dict) -> dict:
"""Converts dictionary keys to lower.
"""Convert dictionary keys to lower.
Args:
d (dict): Dictionary data.