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

Function format_cmdline

ci/debug/port_diagnostic.py:24–31  ·  view source on GitHub ↗

Format command line for display, truncating if needed.

(cmdline: list[str] | None, max_length: int = 80)

Source from the content-addressed store, hash-verified

22
23
24def format_cmdline(cmdline: list[str] | None, max_length: int = 80) -> str:
25 """Format command line for display, truncating if needed."""
26 if not cmdline:
27 return "<no cmdline>"
28 full = " ".join(cmdline)
29 if len(full) <= max_length:
30 return full
31 return full[: max_length - 3] + "..."
32
33
34def get_process_tree(proc: psutil.Process) -> list[psutil.Process]:

Callers 1

diagnose_portFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected