From 21e9dbfc2907bce404a24a78500f4e5ee2500915 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 11 May 2023 21:22:28 +0300 Subject: [PATCH] Updated for naming --- slpkg/views/ascii.py | 2 +- slpkg/views/views.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slpkg/views/ascii.py b/slpkg/views/ascii.py index e85106f2..ba6a13e7 100644 --- a/slpkg/views/ascii.py +++ b/slpkg/views/ascii.py @@ -58,7 +58,7 @@ class Ascii(Configs): print(f'{self.bgreen}{self.vertical_line}{self.endc} Package:' + ' ' * 22 + 'Version:' + ' ' * (self.columns - 66) + 'Size:' + ' ' * 14 + f'Repo:{self.bgreen} {self.vertical_line}{self.endc}') - def draw_view_package(self, package: str, version: str, size: str, color: str, repo: str) -> None: + def draw_package(self, package: str, version: str, size: str, color: str, repo: str) -> None: """ Draw nad print the packages. """ if len(version) >= 11 and self.columns <= 80: version: str = f'{version[:10]}...' diff --git a/slpkg/views/views.py b/slpkg/views/views.py index dd25b90b..e65509b8 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -108,7 +108,7 @@ class ViewMessage(Configs): size: str = self.utils.convert_file_sizes( int(''.join(re.findall(r'\d+', self.data[package]['size_comp'])))) - self.ascii.draw_view_package(package, version, size, color, self.repository) + self.ascii.draw_package(package, version, size, color, self.repository) def view_install_upgrade_package(self, package: str, mode: str) -> None: size: str = str() @@ -135,7 +135,7 @@ class ViewMessage(Configs): color: str = self.violet package: str = self.build_package_and_version(package) - self.ascii.draw_view_package(package, version, size, color, self.repository) + self.ascii.draw_package(package, version, size, color, self.repository) def view_download_package(self, package: str) -> None: size: str = str() @@ -147,7 +147,7 @@ class ViewMessage(Configs): size: str = self.utils.convert_file_sizes( int(''.join(re.findall(r'\d+', self.data[package]['size_comp'])))) - self.ascii.draw_view_package(package, version, size, color, self.repository) + self.ascii.draw_package(package, version, size, color, self.repository) def view_remove_package(self, package: str) -> None: installed: str = self.utils.is_package_installed(package) @@ -156,7 +156,7 @@ class ViewMessage(Configs): size: str = self.utils.get_file_size(Path(self.log_packages, installed)) repository: str = repo_tag.lower().replace('_', '') - self.ascii.draw_view_package(package, version, size, self.red, repository) + self.ascii.draw_package(package, version, size, self.red, repository) def logs_packages(self, dependencies: list) -> None: print('The following logs will be removed:\n')