diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index 06391807..72e454f2 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -110,7 +110,7 @@ class Slackbuilds(Configs): dependencies = list(OrderedDict.fromkeys(self.dependencies)) if dependencies: - self.dependencies = self.choose_dependencies(dependencies) + self.dependencies: list = self.choose_dependencies(dependencies) # Clean up the main packages if they were selected for dependencies. for dep in self.dependencies: @@ -235,7 +235,7 @@ class Slackbuilds(Configs): def patch_sbo_tag(self, sbo: str) -> None: """ Patching SBo TAG from the configuration file. """ - sbo_script = Path(self.build_path, sbo, f'{sbo}.SlackBuild') + sbo_script: Path = Path(self.build_path, sbo, f'{sbo}.SlackBuild') if sbo_script.is_file() and self.repos.patch_repo_tag: @@ -250,7 +250,7 @@ class Slackbuilds(Configs): def logging_installed_dependencies(self, name: str) -> None: """ Logging installed dependencies and used for remove. """ - exist = self.session.query(LogsDependencies.name).filter( + exist: tuple = self.session.query(LogsDependencies.name).filter( LogsDependencies.name == name).first() requires: list = Requires(self.data, name).resolve() @@ -292,7 +292,7 @@ class Slackbuilds(Configs): version: str = self.data[name][2] pattern: str = f'{name}-{version}*{self.repos.repo_tag}*' - tmp = Path(self.tmp_path) + tmp: Path = Path(self.tmp_path) packages: list = [file.name for file in tmp.glob(pattern)] try: @@ -315,7 +315,7 @@ class Slackbuilds(Configs): if self.option_for_jobs: self.set_makeflags() - name = f'{name}.SlackBuild' + name: str = f'{name}.SlackBuild' message: str = f'{self.red}Build{self.endc}' self.process_message: str = f"package '{name}' to build" diff --git a/slpkg/views/cli_menu.py b/slpkg/views/cli_menu.py index 85898ba6..1876f97e 100644 --- a/slpkg/views/cli_menu.py +++ b/slpkg/views/cli_menu.py @@ -23,7 +23,7 @@ class Usage(Configs): def help_short(self, status: int) -> NoReturn: """ Prints the short menu. """ - args = ( + args: str = ( f'Usage: {self.prog_name} [{self.cyan}COMMAND{self.endc}] [{self.yellow}OPTIONS{self.endc}] ' f'[FILELIST|PACKAGES...]\n' f'\n slpkg [{self.cyan}COMMAND{self.endc}] [-u, update, -U, upgrade, -c, check-updates, -I, repo-info]\n' diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 030692b8..0af1d03e 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -31,7 +31,7 @@ class ViewMessage(Configs): self.upgrade = Upgrade(self.flags, self.data) self.repos = Repositories() - self.download_only = self.tmp_slpkg + self.download_only: Path = self.tmp_slpkg self.installed_packages: list = [] self.option_for_resolve_off: bool = self.utils.is_option(