Updated comments

This commit is contained in:
Dimitris Zlatanidis 2023-11-27 18:30:13 +02:00
parent 8a2d2f00d9
commit 59a3c52cfc

View file

@ -76,7 +76,7 @@ class Utilities(Configs):
@staticmethod
def split_package(package: str) -> dict:
""" Split the package by the name, version, arch, build and tag. """
""" Splits the binary package name in name, version, arch, build and tag. """
name: str = '-'.join(package.split('-')[:-3])
version: str = ''.join(package[len(name):].split('-')[:-2])
arch: str = ''.join(package[len(name + version) + 2:].split('-')[:-1])
@ -138,7 +138,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 the text file. """
""" Reads the text file and returns it into a list. """
try:
with open(file, 'r', encoding='utf-8', errors='replace') as text_file:
return text_file.readlines()
@ -210,7 +210,7 @@ class Utilities(Configs):
return True
def is_binary_repo(self, repo: str) -> bool:
""" Checks if the repository is binary. """
""" Returns True if the repository is binary. """
if repo in tuple(self.repos.repositories.keys())[2:]:
return True