Updated for typing

This commit is contained in:
Dimitris Zlatanidis 2023-05-07 17:05:28 +03:00
parent 1e833dd68e
commit b2304c7ced

View file

@ -36,7 +36,7 @@ class SearchPackage(Configs):
self.summary_of_searching()
def search_to_all_repositories(self):
def search_to_all_repositories(self) -> None:
for repo, value in self.repos.repositories.items():
if value[0]: # Check if the repository is enabled
if self.utils.is_binary_repo(repo):
@ -46,7 +46,7 @@ class SearchPackage(Configs):
data: dict = SBoQueries(repo).repository_data()
self.search_for_the_packages(data, repo)
def search_to_the_repository(self):
def search_to_the_repository(self) -> None:
if self.is_binary:
data: dict = BinQueries(self.repository).repository_data()
self.search_for_the_packages(data, self.repository)
@ -54,7 +54,7 @@ class SearchPackage(Configs):
data: dict = SBoQueries(self.repository).repository_data()
self.search_for_the_packages(data, self.repository)
def search_for_the_packages(self, data, repo):
def search_for_the_packages(self, data: dict, repo: str) -> None:
for package in self.packages:
for name, data_pkg in data.items():
@ -62,7 +62,7 @@ class SearchPackage(Configs):
self.matching += 1
self.data_dict[self.matching] = (repo, name, data_pkg[0])
def summary_of_searching(self):
def summary_of_searching(self) -> None:
if self.matching:
for pkg, item in self.data_dict.items():
print(f'{item[0]}: {self.cyan}{item[1]}{self.endc} '