Skip to content

Commit 995b68d

Browse files
author
Ivan Sinkarenko
committed
Make formatting more obvious when multiple yank reasons exist
1 parent 1390358 commit 995b68d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

simple_repository_browser/short_release_info.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,15 @@ def release_infos(
182182
if yanked_files > 0 and not_yanked_files > 0:
183183
labels["partial-yank"] = "Partially yanked"
184184
elif yanked_files > 0 and not_yanked_files == 0:
185-
labels["yanked"] = ". ".join(yank_reasons or ["No yank reasons given"])
185+
yank_reasons_len = len(yank_reasons)
186+
if yank_reasons_len == 1:
187+
labels["yanked"] = next(iter(yank_reasons))
188+
elif yank_reasons_len > 1:
189+
labels["yanked"] = (
190+
"Yanked for multiple reasons, see individual files for details"
191+
)
192+
else:
193+
labels["yanked"] = "No yank reasons given"
186194

187195
if quarantined_files_for_release:
188196
quarantine_release_times = [

0 commit comments

Comments
 (0)