Skip to content

Commit

Permalink
Prefer str over repr in _lookup_in_prefix_packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Dec 14, 2023
1 parent 2ce0e20 commit 904078a
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions conda_build/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,9 +1187,7 @@ def _lookup_in_prefix_packages(
if len(precs_in_reqs) == 1:
_print_msg(
errors,
"{}: {} found in {}{}".format(
info_prelude, n_dso_p, precs_in_reqs[0], and_also
),
f"{info_prelude}: {n_dso_p} found in {precs_in_reqs[0]}{and_also}",
verbose=verbose,
)
elif in_whitelist:
Expand All @@ -1201,25 +1199,20 @@ def _lookup_in_prefix_packages(
elif len(precs_in_reqs) == 0 and len(precs) > 0:
_print_msg(
errors,
"{}: {} found in {}{}".format(
msg_prelude, n_dso_p, [prec.name for prec in precs], and_also
),
f"{msg_prelude}: {n_dso_p} found in {[str(prec) for prec in precs]}{and_also}",
verbose=verbose,
)
_print_msg(
errors,
"{}: .. but {} not in reqs/run, (i.e. it is overlinking)"
" (likely) or a missing dependency (less likely)".format(
msg_prelude, [prec.name for prec in precs]
),
f"{msg_prelude}: .. but {[str(prec) for prec in precs]} not in reqs/run, "
"(i.e. it is overlinking) (likely) or a missing dependency (less likely)",
verbose=verbose,
)
elif len(precs_in_reqs) > 1:
_print_msg(
errors,
"{}: {} found in multiple packages in run/reqs: {}{}".format(
warn_prelude, in_prefix_dso, precs_in_reqs, and_also
),
f"{warn_prelude}: {in_prefix_dso} found in multiple packages in run/reqs: "
f"{[str(prec) for prec in precs_in_reqs]}{and_also}",
verbose=verbose,
)
else:
Expand Down

0 comments on commit 904078a

Please sign in to comment.