diff --git a/slpkg/binaries/required.py b/slpkg/binaries/required.py index 785f41e2..2783ede3 100644 --- a/slpkg/binaries/required.py +++ b/slpkg/binaries/required.py @@ -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)) diff --git a/slpkg/sbos/dependencies.py b/slpkg/sbos/dependencies.py index 6e911d99..74795e20 100644 --- a/slpkg/sbos/dependencies.py +++ b/slpkg/sbos/dependencies.py @@ -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()