(argv: list[str] | None = None)
| 33 | |
| 34 | |
| 35 | def parse_args(argv: list[str] | None = None) -> argparse.Namespace: |
| 36 | parser = argparse.ArgumentParser( |
| 37 | description="Inspect the GCC -fopt-info-all optimization report for a board." |
| 38 | ) |
| 39 | parser.add_argument("--first", action="store_true", help="Inspect the first board") |
| 40 | parser.add_argument("--cwd", type=Path, help="Custom working directory") |
| 41 | parser.add_argument( |
| 42 | "--max-bytes", |
| 43 | type=int, |
| 44 | default=_env_default_max_bytes(), |
| 45 | help=( |
| 46 | f"Cap report tail printed to stdout (default " |
| 47 | f"{DEFAULT_MAX_REPORT_BYTES} bytes; override via FL_OPT_REPORT_MAX_BYTES " |
| 48 | f"env var; set to 0 to disable the cap entirely)." |
| 49 | ), |
| 50 | ) |
| 51 | return parser.parse_args(argv) |
| 52 | |
| 53 | |
| 54 | def main(argv: list[str] | None = None) -> int: |
no test coverage detected