mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-21 19:27:47 +01:00
Updated for coding style
This commit is contained in:
parent
92717ea575
commit
0f299a56ed
6 changed files with 10 additions and 10 deletions
|
@ -24,7 +24,7 @@ class BinQueries(Configs):
|
||||||
if self.name in self.black.packages():
|
if self.name in self.black.packages():
|
||||||
self.name: str = ''
|
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. """
|
""" Returns all the names of the binaries packages. """
|
||||||
pkgs: tuple = self.session.query(
|
pkgs: tuple = self.session.query(
|
||||||
BinariesTable.name).where(
|
BinariesTable.name).where(
|
||||||
|
@ -32,7 +32,7 @@ class BinQueries(Configs):
|
||||||
|
|
||||||
return [pkg[0] for pkg in pkgs]
|
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. """
|
""" Returns all the binaries packages. """
|
||||||
pkgs: tuple = self.session.query(
|
pkgs: tuple = self.session.query(
|
||||||
BinariesTable.package).where(
|
BinariesTable.package).where(
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Required:
|
||||||
def __init__(self, name: str, repo: str):
|
def __init__(self, name: str, repo: str):
|
||||||
self.name: str = name
|
self.name: str = name
|
||||||
self.repo: str = repo
|
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:
|
def resolve(self) -> list:
|
||||||
""" Resolve the dependencies. """
|
""" Resolve the dependencies. """
|
||||||
|
|
|
@ -402,7 +402,7 @@ class Argparse(Configs):
|
||||||
|
|
||||||
repo_packages: list = SBoQueries('').sbos()
|
repo_packages: list = SBoQueries('').sbos()
|
||||||
if self.utils.is_option(self.flag_binaries, self.flags):
|
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
|
installed: list = self.utils.installed_packages
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,10 @@ class RepoInfo(Configs):
|
||||||
packages: dict = {
|
packages: dict = {
|
||||||
self.repos.sbo_repo_name: len(SBoQueries('').sbos()),
|
self.repos.sbo_repo_name: len(SBoQueries('').sbos()),
|
||||||
self.repos.ponce_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.alien_repo_name: len(BinQueries('', repo).all_package_names_by_repo()),
|
||||||
self.repos.gnome_repo_name: len(BinQueries('', repo).all_package_names()),
|
self.repos.gnome_repo_name: len(BinQueries('', repo).all_package_names_by_repo()),
|
||||||
self.repos.conraid_repo_name: len(BinQueries('', repo).all_package_names()),
|
self.repos.conraid_repo_name: len(BinQueries('', repo).all_package_names_by_repo()),
|
||||||
self.repos.slackonly_repo_name: len(BinQueries('', repo).all_package_names())
|
self.repos.slackonly_repo_name: len(BinQueries('', repo).all_package_names_by_repo())
|
||||||
}
|
}
|
||||||
|
|
||||||
if value[0]:
|
if value[0]:
|
||||||
|
|
|
@ -55,7 +55,7 @@ class SearchPackage(Configs):
|
||||||
print(f'{repository}{self.cyan}{pr[0]}{self.endc}-{self.yellow}{version}{self.endc}'
|
print(f'{repository}{self.cyan}{pr[0]}{self.endc}-{self.yellow}{version}{self.endc}'
|
||||||
f'{self.green}{desc}{self.endc}')
|
f'{self.green}{desc}{self.endc}')
|
||||||
else:
|
else:
|
||||||
pkg_repo: list = BinQueries('', repo).all_package_names()
|
pkg_repo: list = BinQueries('', repo).all_package_names_by_repo()
|
||||||
|
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
for pr in pkg_repo:
|
for pr in pkg_repo:
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Upgrade(Configs):
|
||||||
def packages(self) -> Generator[str, None, None]:
|
def packages(self) -> Generator[str, None, None]:
|
||||||
""" Compares version of packages and returns the maximum. """
|
""" Compares version of packages and returns the maximum. """
|
||||||
if self.utils.is_option(self.flag_bin_repository, self.flags):
|
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:
|
else:
|
||||||
repo_packages: list = SBoQueries('').sbos()
|
repo_packages: list = SBoQueries('').sbos()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue