Commit 07d06bb
committed
style: Condense printing of trailing hunk lines
This commit makes a minor stylistic refactoring in the
`scripts/gha/get_pr_review_comments.py` script.
When displaying the trailing lines of a diff hunk (for
`--context-lines > 0`, after the header line is potentially
printed and removed from the `hunk_lines` list), the script
now uses `print("\n".join(hunk_lines[-args.context_lines:]))`
instead of explicitly creating a sub-list and then looping
through it with `print()` for each line.
This change achieves the same visual output (printing a newline
if `hunk_lines` becomes empty after header removal) but is more
concise.1 parent 9312a0c commit 07d06bb
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
| |||
0 commit comments