diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index 064c8fbc..48e599a2 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -166,14 +166,14 @@ class Slackbuilds(Configs): if not self.mode == 'build': - pkg = self.creating_package_for_install(sbo) + pkg: str = self.creating_package_for_install(sbo) self.install_package(pkg) if not self.utils.is_option(self.flag_resolve_off, self.flags): self.logging_installed_dependencies(sbo) else: - package = self.utils.is_installed(sbo, self.file_pattern) - version = self.utils.split_installed_pkg(package)[1] + package: str = self.utils.is_installed(sbo, self.file_pattern) + version: str = self.utils.split_installed_pkg(package)[1] self.view_message.view_skipping_packages(sbo, version) def patch_sbo_tag(self, sbo): @@ -187,7 +187,7 @@ class Slackbuilds(Configs): with open(sbo_script, 'w') as script: for line in lines: if line.startswith('TAG=$'): - line = f'TAG=${{TAG:-{self.sbo_repo_tag}}}\n' + line: str = f'TAG=${{TAG:-{self.sbo_repo_tag}}}\n' script.write(line) def logging_installed_dependencies(self, name: str): @@ -211,7 +211,7 @@ class Slackbuilds(Configs): def install_package(self, package: str): """ Install the packages that before created in the tmp directory. """ - pkg = self.utils.split_installed_pkg(package)[0] + pkg: str = self.utils.split_installed_pkg(package)[0] execute: str = self.installpkg if (self.utils.is_option(self.flag_reinstall, self.flags) and @@ -223,7 +223,7 @@ class Slackbuilds(Configs): if self.mode == 'upgrade': self.process_message: str = f"package '{pkg}' to upgrade" - message = f'{self.cyan}Upgrade{self.endc}' + message: str = f'{self.cyan}Upgrade{self.endc}' command: str = f'{execute} {self.tmp_path}/{package}' @@ -237,7 +237,7 @@ class Slackbuilds(Configs): pattern: str = f'{name}-{version}*{self.sbo_repo_tag}*' tmp = Path(self.tmp_path) - packages = [file.name for file in tmp.glob(pattern)] + packages: list = [file.name for file in tmp.glob(pattern)] return max(packages)