mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
Updated for type hints
This commit is contained in:
parent
bc25a0af53
commit
5d2586c6b7
3 changed files with 7 additions and 7 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue