mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +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:
|
||||
""" 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:
|
||||
return requires
|
||||
return required
|
||||
|
||||
for req in requires:
|
||||
for req in required:
|
||||
if req:
|
||||
sub: list[str] = BinQueries(req, self.repo).required()
|
||||
sub_required: list[str] = BinQueries(req, self.repo).required()
|
||||
|
||||
for s in sub:
|
||||
requires.append(s)
|
||||
for sub in sub_required:
|
||||
required.append(sub)
|
||||
|
||||
# Clean for dependencies not in the repository.
|
||||
for dep in requires:
|
||||
for dep in required:
|
||||
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
|
||||
for req in requires:
|
||||
if req:
|
||||
sub: list[str] = SBoQueries(req).requires() # type: ignore
|
||||
for s in sub:
|
||||
requires.append(s)
|
||||
sub_requires: list[str] = SBoQueries(req).requires() # type: ignore
|
||||
for sub in sub_requires:
|
||||
requires.append(sub)
|
||||
|
||||
requires.reverse()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue