Updated for coding style

This commit is contained in:
Dimitris Zlatanidis 2023-03-29 23:41:20 +03:00
parent 92717ea575
commit 0f299a56ed
6 changed files with 10 additions and 10 deletions

View file

@ -24,7 +24,7 @@ class BinQueries(Configs):
if self.name in self.black.packages():
self.name: str = ''
def all_package_names(self) -> list:
def all_package_names_by_repo(self) -> list:
""" Returns all the names of the binaries packages. """
pkgs: tuple = self.session.query(
BinariesTable.name).where(
@ -32,7 +32,7 @@ class BinQueries(Configs):
return [pkg[0] for pkg in pkgs]
def all_binaries_packages(self) -> list:
def all_binaries_packages_by_repo(self) -> list:
""" Returns all the binaries packages. """
pkgs: tuple = self.session.query(
BinariesTable.package).where(

View file

@ -11,7 +11,7 @@ class Required:
def __init__(self, name: str, repo: str):
self.name: str = name
self.repo: str = repo
self.repo_package_names: list = BinQueries(name, self.repo).all_package_names()
self.repo_package_names: list = BinQueries(name, self.repo).all_package_names_by_repo()
def resolve(self) -> list:
""" Resolve the dependencies. """

View file

@ -402,7 +402,7 @@ class Argparse(Configs):
repo_packages: list = SBoQueries('').sbos()
if self.utils.is_option(self.flag_binaries, self.flags):
repo_packages: list = BinQueries('', self.binary_repo).all_package_names()
repo_packages: list = BinQueries('', self.binary_repo).all_package_names_by_repo()
installed: list = self.utils.installed_packages

View file

@ -53,10 +53,10 @@ class RepoInfo(Configs):
packages: dict = {
self.repos.sbo_repo_name: len(SBoQueries('').sbos()),
self.repos.ponce_repo_name: len(SBoQueries('').sbos()),
self.repos.alien_repo_name: len(BinQueries('', repo).all_package_names()),
self.repos.gnome_repo_name: len(BinQueries('', repo).all_package_names()),
self.repos.conraid_repo_name: len(BinQueries('', repo).all_package_names()),
self.repos.slackonly_repo_name: len(BinQueries('', repo).all_package_names())
self.repos.alien_repo_name: len(BinQueries('', repo).all_package_names_by_repo()),
self.repos.gnome_repo_name: len(BinQueries('', repo).all_package_names_by_repo()),
self.repos.conraid_repo_name: len(BinQueries('', repo).all_package_names_by_repo()),
self.repos.slackonly_repo_name: len(BinQueries('', repo).all_package_names_by_repo())
}
if value[0]:

View file

@ -55,7 +55,7 @@ class SearchPackage(Configs):
print(f'{repository}{self.cyan}{pr[0]}{self.endc}-{self.yellow}{version}{self.endc}'
f'{self.green}{desc}{self.endc}')
else:
pkg_repo: list = BinQueries('', repo).all_package_names()
pkg_repo: list = BinQueries('', repo).all_package_names_by_repo()
for pkg in packages:
for pr in pkg_repo:

View file

@ -25,7 +25,7 @@ class Upgrade(Configs):
def packages(self) -> Generator[str, None, None]:
""" Compares version of packages and returns the maximum. """
if self.utils.is_option(self.flag_bin_repository, self.flags):
repo_packages: list = BinQueries('', self.repo).all_package_names()
repo_packages: list = BinQueries('', self.repo).all_package_names_by_repo()
else:
repo_packages: list = SBoQueries('').sbos()