Fix for lists

This commit is contained in:
Dimitris Zlatanidis 2024-03-15 21:51:31 +02:00
parent 7c07574c64
commit 3083e3a7bd

View file

@ -84,13 +84,13 @@ class ViewPackage(Configs):
self.email: str = line[7:-2].strip() self.email: str = line[7:-2].strip()
def assign_dependencies(self, item: dict) -> None: def assign_dependencies(self, item: dict) -> None:
self.dependencies: str = (', '.join([f'{self.cyan}{pkg}' for pkg in item['requires'].split()])) self.dependencies: str = (', '.join([f'{self.cyan}{pkg}' for pkg in item['requires']]))
def assign_dependencies_with_version(self, item: dict, data: dict) -> None: def assign_dependencies_with_version(self, item: dict, data: dict) -> None:
if self.option_for_pkg_version: if self.option_for_pkg_version:
self.dependencies: str = (', '.join( self.dependencies: str = (', '.join(
[f"{self.cyan}{pkg}{self.endc}-{self.yellow}{data[pkg]['version']}" [f"{self.cyan}{pkg}{self.endc}-{self.yellow}{data[pkg]['version']}"
f"{self.green}" for pkg in item['requires'].split() f"{self.green}" for pkg in item['requires']
if pkg in self.repository_packages])) if pkg in self.repository_packages]))
def view_slackbuild_package(self, name: str, item: dict) -> None: def view_slackbuild_package(self, name: str, item: dict) -> None:
@ -101,11 +101,11 @@ class ViewPackage(Configs):
f"Homepage: {self.blue}{self.homepage}{self.endc}\n" f"Homepage: {self.blue}{self.homepage}{self.endc}\n"
f"Download SlackBuild: {self.blue}{self.mirror}" f"Download SlackBuild: {self.blue}{self.mirror}"
f"{item['location']}/{name}{self.repo_tar_suffix}{self.endc}\n" f"{item['location']}/{name}{self.repo_tar_suffix}{self.endc}\n"
f"Download sources: {self.blue}{item['download']}{self.endc}\n" f"Download sources: {self.blue}{' '.join(item['download'])}{self.endc}\n"
f"Download_x86_64 sources: {self.blue}{item['download64']}{self.endc}\n" f"Download_x86_64 sources: {self.blue}{' '.join(item['download64'])}{self.endc}\n"
f"Md5sum: {self.yellow}{item['md5sum']}{self.endc}\n" f"Md5sum: {self.yellow}{' '.join(item['md5sum'])}{self.endc}\n"
f"Md5sum_x86_64: {self.yellow}{item['md5sum64']}{self.endc}\n" f"Md5sum_x86_64: {self.yellow}{' '.join(item['md5sum64'])}{self.endc}\n"
f"Files: {self.green}{item['files']}{self.endc}\n" f"Files: {self.green}{' '.join(item['files'])}{self.endc}\n"
f"Description: {self.green}{item['description']}{self.endc}\n" f"Description: {self.green}{item['description']}{self.endc}\n"
f"Category: {self.red}{item['location']}{self.endc}\n" f"Category: {self.red}{item['location']}{self.endc}\n"
f"SBo url: {self.blue}{self.mirror}{item['location']}/{name}{self.endc}\n" f"SBo url: {self.blue}{self.mirror}{item['location']}/{name}{self.endc}\n"