MCPcopy Create free account
hub / github.com/FastLED/FastLED / parse_args

Function parse_args

ci/optimization_report.py:35–51  ·  view source on GitHub ↗
(argv: list[str] | None = None)

Source from the content-addressed store, hash-verified

33
34
35def 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
54def main(argv: list[str] | None = None) -> int:

Callers 1

mainFunction · 0.70

Calls 2

_env_default_max_bytesFunction · 0.85
parse_argsMethod · 0.80

Tested by

no test coverage detected