From d5fb22f22f33adb96a7b6e9c934a6ec0b4df7582 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 13 May 2023 23:35:21 +0300 Subject: [PATCH] Updated for typing --- slpkg/sbos/slackbuild.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index a9176252..70cf07da 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -105,8 +105,7 @@ class Slackbuilds(Configs): self.dependencies.append(dependency) def remove_duplicate_from_dependencies_list(self) -> None: - if self.dependencies: - self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies)) + self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies)) def add_dependencies_to_install_order(self) -> None: self.install_order.extend(self.dependencies) @@ -153,10 +152,10 @@ class Slackbuilds(Configs): self.utils.remove_folder_if_exists(build_path) location: str = self.data[sbo]['location'] - slackbuild = Path(self.build_path, sbo, f'{sbo}.SlackBuild') + slackbuild: Path = Path(self.build_path, sbo, f'{sbo}.SlackBuild') # Copy slackbuilds to the build folder. - path_repo_package = Path(self.repos.repositories[self.repository]['path'], location, sbo) + path_repo_package: Path = Path(self.repos.repositories[self.repository]['path'], location, sbo) shutil.copytree(path_repo_package, build_path) os.chmod(slackbuild, 0o775) @@ -177,7 +176,7 @@ class Slackbuilds(Configs): def checksum_downloaded_sources(self) -> None: for sbo in self.install_order: - path = Path(self.build_path, sbo) + path: Path = Path(self.build_path, sbo) if self.os_arch == 'x86_64' and self.data[sbo]['md5sum64']: checksums: list = self.data[sbo]['md5sum64'].split()