Skip to content

Commit

Permalink
refactor(search_cli): simplify a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Aug 30, 2024
1 parent 7ee253b commit 642a644
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pikaur/search_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,8 @@ def search_packages(
pool.close()

result_local = request_local.get()
result_repo = None
if request_repo:
result_repo = request_repo.get()
result_aur = None
result_repo = request_repo.get() if request_repo else []
result_aur = []
if request_aur:
try:
result_aur = request_aur.get()
Expand All @@ -230,12 +228,9 @@ def search_packages(
if not args.quiet:
sys.stderr.write("\n")

joined_repo_results: Iterable[pyalpm.Package] = result_repo or []
joined_aur_results: Iterable[AURPackageInfo] = result_aur or []

return print_package_search_results(
repo_packages=joined_repo_results,
aur_packages=joined_aur_results,
repo_packages=result_repo,
aur_packages=result_aur,
local_pkgs_versions=result_local,
enumerated=enumerated,
list_mode=bool(args.list),
Expand Down

0 comments on commit 642a644

Please sign in to comment.