Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Oct 21, 2023
1 parent c5199a3 commit 17a93ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions conda_libmamba_solver/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_repoquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 17a93ad

Please sign in to comment.