Print a small CLI summary whenever --targets is used.
(matched_paths: list[str], requested_targets: list[str] | None)
| 370 | |
| 371 | |
| 372 | def print_target_match_summary(matched_paths: list[str], requested_targets: list[str] | None) -> None: |
| 373 | """ |
| 374 | Print a small CLI summary whenever --targets is used. |
| 375 | """ |
| 376 | if not requested_targets: |
| 377 | return |
| 378 | |
| 379 | print(f"\nMatched {len(matched_paths)} file(s) from --targets:") |
| 380 | preview_limit = 50 |
| 381 | for rel in matched_paths[:preview_limit]: |
| 382 | print(f"- {rel}") |
| 383 | if len(matched_paths) > preview_limit: |
| 384 | print(f"... and {len(matched_paths) - preview_limit} more") |
| 385 | |
| 386 | |
| 387 | def _iso_today() -> date: |