diff --git a/ChangeLog.txt b/ChangeLog.txt index 163ab9ca..b5fe08ca 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +4.7.4 - 04/04/2023 +Fixed: +- Python typing hints + 4.7.3 - 03/04/2023 Fixed: - Option -B for -u, update and -c, check-updates commands diff --git a/slpkg/binaries/queries.py b/slpkg/binaries/queries.py index 4ff8c2ea..f9e7dbec 100644 --- a/slpkg/binaries/queries.py +++ b/slpkg/binaries/queries.py @@ -24,7 +24,7 @@ class BinQueries(Configs): if self.name in self.black.packages(): self.name: str = '' - def count_packages(self) -> list: + def count_packages(self) -> int: """ Counts the number of the packages. """ count = self.session.query( BinariesTable.id).where( diff --git a/slpkg/binaries/required.py b/slpkg/binaries/required.py index 0b8a7554..a42c698c 100644 --- a/slpkg/binaries/required.py +++ b/slpkg/binaries/required.py @@ -1,6 +1,8 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +from typing import Generator + from slpkg.repositories import Repositories from slpkg.binaries.queries import BinQueries @@ -13,7 +15,7 @@ class Required: self.name: str = name self.repo: str = repo self.repos = Repositories() - self.repo_package_names: list = BinQueries( + self.repo_package_names: Generator = BinQueries( self.name, self.repo).all_package_names_by_repo() self.special_repos: list = [ diff --git a/slpkg/sbos/queries.py b/slpkg/sbos/queries.py index 3b5338dc..af524a6a 100644 --- a/slpkg/sbos/queries.py +++ b/slpkg/sbos/queries.py @@ -29,14 +29,14 @@ class SBoQueries(Configs): if self.repos.ponce_repo: self.sbo_table = PonceTable - def count_packages(self): + def count_packages(self) -> int: """ Counts the number of the packages. """ count = self.session.query( self.sbo_table.id).count() return count - def repo_name(self): + def repo_name(self) -> str: """ Returns the repo name by the table. """ table = inspect(self.sbo_table) repo = self.repos.sbo_repo_name