From 17a93ad000b1e2df97e6628dd177770d4f25ef53 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sat, 21 Oct 2023 17:39:01 +0200 Subject: [PATCH] pre-commit --- conda_libmamba_solver/index.py | 12 +++++++++--- tests/test_repoquery.py | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/conda_libmamba_solver/index.py b/conda_libmamba_solver/index.py index 1b607db2..7d05c3d8 100644 --- a/conda_libmamba_solver/index.py +++ b/conda_libmamba_solver/index.py @@ -320,19 +320,25 @@ def _load_installed(self, records: Iterable[PackageRecord]) -> api.Repo: repo.set_installed() return repo - def whoneeds(self, query: Union[str, MatchSpec], records=True) -> Union[Iterable[PackageRecord], dict, str]: + def whoneeds( + self, query: Union[str, MatchSpec], records=True + ) -> Union[Iterable[PackageRecord], dict, str]: result_str = self._query.whoneeds(self._prepare_query(query), self._format) if self._format == api.QueryFormat.JSON: return self._process_query_result(result_str, records=records) return result_str - def depends(self, query: Union[str, MatchSpec], records=True) -> Union[Iterable[PackageRecord], dict, str]: + def depends( + self, query: Union[str, MatchSpec], records=True + ) -> Union[Iterable[PackageRecord], dict, str]: result_str = self._query.depends(self._prepare_query(query), self._format) if self._format == api.QueryFormat.JSON: return self._process_query_result(result_str, records=records) return result_str - def search(self, query: Union[str, MatchSpec], records=True) -> Union[Iterable[PackageRecord], dict, str]: + def search( + self, query: Union[str, MatchSpec], records=True + ) -> Union[Iterable[PackageRecord], dict, str]: result_str = self._query.find(self._prepare_query(query), self._format) if self._format == api.QueryFormat.JSON: return self._process_query_result(result_str, records=records) diff --git a/tests/test_repoquery.py b/tests/test_repoquery.py index eaff1619..98a4e63b 100644 --- a/tests/test_repoquery.py +++ b/tests/test_repoquery.py @@ -3,9 +3,10 @@ # SPDX-License-Identifier: BSD-3-Clause import json -from .utils import conda_subprocess from conda_libmamba_solver.index import LibMambaIndexHelper +from .utils import conda_subprocess + def test_repoquery(): p = conda_subprocess("repoquery", "--help")