(args: argparse.Namespace)
| 390 | |
| 391 | |
| 392 | def collect_paths(args: argparse.Namespace) -> tuple[list[Path], bool]: |
| 393 | if args.paths: |
| 394 | return [Path(path) for path in args.paths], False |
| 395 | if args.all: |
| 396 | return all_article_files(), False |
| 397 | if args.staged: |
| 398 | return staged_files(), True |
| 399 | if args.base: |
| 400 | return changed_files(args.base, args.head), False |
| 401 | return staged_files(), True |
| 402 | |
| 403 | |
| 404 | def check_files(args: argparse.Namespace) -> list[Failure]: |
no test coverage detected