[BE] Fix rule not found error message (#101745)
Prevent error message from becoming of single column of characters
Thanks @clee200 for explaining how it worked before
<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at fef1e25</samp>
> _`reject_reason` fixed_
> _Syntax error caused trouble_
> _Autumn of bugs ends_
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101745
Approved by: https://github.com/kit1980, https://github.com/osalpekar
diff --git a/.github/scripts/trymerge.py b/.github/scripts/trymerge.py
index f8670a6..6e17b3b 100755
--- a/.github/scripts/trymerge.py
+++ b/.github/scripts/trymerge.py
@@ -1262,9 +1262,9 @@
reject_reason_score = num_matching_files
reject_reason = "\n".join(
(
- f"Not all files match rule `{rule_name}`."
- f"{num_matching_files} files matched, but there are still non-matching files:"
- f"{','.join(non_matching_files[:5])}{', ...' if len(non_matching_files) > 5 else ''}"
+ f"Not all files match rule `{rule_name}`.",
+ f"{num_matching_files} files matched, but there are still non-matching files:",
+ f"{','.join(non_matching_files[:5])}{', ...' if len(non_matching_files) > 5 else ''}",
)
)
continue