mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-16 03:41:11 +01:00
Switched to tuples
This commit is contained in:
parent
dc461eff53
commit
0f5eb1942f
2 changed files with 9 additions and 9 deletions
|
@ -19,13 +19,13 @@ class BinQueries:
|
|||
def repository_data(self) -> dict:
|
||||
""" Returns a dictionary with the repository data. """
|
||||
repos_dict: dict = {}
|
||||
repository_data = self.session.query(
|
||||
repository_data: tuple = self.session.query(
|
||||
BinariesTable).where(
|
||||
BinariesTable.repo == self.repo).all()
|
||||
|
||||
for data in repository_data:
|
||||
if data.name not in self.black.packages():
|
||||
repos_dict[data.name] = [
|
||||
repos_dict[data.name] = (
|
||||
data.version,
|
||||
data.package,
|
||||
data.mirror,
|
||||
|
@ -37,18 +37,18 @@ class BinQueries:
|
|||
data.suggests,
|
||||
data.description,
|
||||
data.checksum
|
||||
]
|
||||
)
|
||||
|
||||
return repos_dict
|
||||
|
||||
def repositories_data(self) -> dict:
|
||||
""" Returns a dictionary with repositories data. """
|
||||
repos_dict: dict = {}
|
||||
repositories_data = self.session.query(BinariesTable).all()
|
||||
repositories_data: tuple = self.session.query(BinariesTable).all()
|
||||
|
||||
for data in repositories_data:
|
||||
if data.name not in self.black.packages():
|
||||
repos_dict[data.id] = [
|
||||
repos_dict[data.id] = (
|
||||
data.repo,
|
||||
data.name,
|
||||
data.version,
|
||||
|
@ -62,7 +62,7 @@ class BinQueries:
|
|||
data.suggests,
|
||||
data.description,
|
||||
data.checksum
|
||||
]
|
||||
)
|
||||
|
||||
return repos_dict
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ class SBoQueries(Configs):
|
|||
def repository_data(self) -> dict:
|
||||
""" Returns a dictionary with the repository data. """
|
||||
repos_dict: dict = {}
|
||||
repository_data = self.session.query(self.sbo_table).all()
|
||||
repository_data: tuple = self.session.query(self.sbo_table).all()
|
||||
|
||||
for data in repository_data:
|
||||
if data.name not in self.black.packages():
|
||||
repos_dict[data.name] = [
|
||||
repos_dict[data.name] = (
|
||||
data.location,
|
||||
data.files,
|
||||
data.version,
|
||||
|
@ -42,7 +42,7 @@ class SBoQueries(Configs):
|
|||
data.md5sum64,
|
||||
data.requires,
|
||||
data.short_description
|
||||
]
|
||||
)
|
||||
|
||||
return repos_dict
|
||||
|
||||
|
|
Loading…
Reference in a new issue