mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-11 20:48:11 +01:00
Updated for coding style
This commit is contained in:
parent
ab62b41612
commit
5360c65bf2
2 changed files with 13 additions and 13 deletions
|
@ -17,23 +17,23 @@ class Required:
|
||||||
|
|
||||||
def resolve(self) -> list:
|
def resolve(self) -> list:
|
||||||
""" Resolve the dependencies. """
|
""" Resolve the dependencies. """
|
||||||
requires: list[str] = BinQueries(self.name, self.repo).required()
|
required: list[str] = BinQueries(self.name, self.repo).required()
|
||||||
|
|
||||||
if self.repos.salixos_repo_name:
|
if self.repos.salixos_repo_name:
|
||||||
return requires
|
return required
|
||||||
|
|
||||||
for req in requires:
|
for req in required:
|
||||||
if req:
|
if req:
|
||||||
sub: list[str] = BinQueries(req, self.repo).required()
|
sub_required: list[str] = BinQueries(req, self.repo).required()
|
||||||
|
|
||||||
for s in sub:
|
for sub in sub_required:
|
||||||
requires.append(s)
|
required.append(sub)
|
||||||
|
|
||||||
# Clean for dependencies not in the repository.
|
# Clean for dependencies not in the repository.
|
||||||
for dep in requires:
|
for dep in required:
|
||||||
if dep not in self.repo_package_names:
|
if dep not in self.repo_package_names:
|
||||||
requires.remove(dep)
|
required.remove(dep)
|
||||||
|
|
||||||
requires.reverse()
|
required.reverse()
|
||||||
|
|
||||||
return list(dict.fromkeys(requires))
|
return list(dict.fromkeys(required))
|
||||||
|
|
|
@ -16,9 +16,9 @@ class Requires:
|
||||||
requires: list[str] = SBoQueries(self.name).requires() # type: ignore
|
requires: list[str] = SBoQueries(self.name).requires() # type: ignore
|
||||||
for req in requires:
|
for req in requires:
|
||||||
if req:
|
if req:
|
||||||
sub: list[str] = SBoQueries(req).requires() # type: ignore
|
sub_requires: list[str] = SBoQueries(req).requires() # type: ignore
|
||||||
for s in sub:
|
for sub in sub_requires:
|
||||||
requires.append(s)
|
requires.append(sub)
|
||||||
|
|
||||||
requires.reverse()
|
requires.reverse()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue