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

Function main

ci/debug/port_diagnostic.py:325–348  ·  view source on GitHub ↗

Main entry point.

()

Source from the content-addressed store, hash-verified

323
324
325def main() -> int:
326 """Main entry point."""
327 parser = argparse.ArgumentParser(
328 description="Diagnose serial port locking issues",
329 epilog="Example: uv run python ci/debug/port_diagnostic.py COM4",
330 )
331 parser.add_argument(
332 "port", help="Serial port to diagnose (e.g., COM4, /dev/ttyUSB0)"
333 )
334
335 args = parser.parse_args()
336
337 try:
338 diagnose_port(args.port)
339 return 0
340 except KeyboardInterrupt as ki:
341 handle_keyboard_interrupt(ki)
342 raise
343 except Exception as e:
344 print(f"❌ Error during diagnosis: {e}", file=sys.stderr)
345 import traceback
346
347 traceback.print_exc()
348 return 1
349
350
351if __name__ == "__main__":

Callers 1

port_diagnostic.pyFile · 0.70

Calls 4

diagnose_portFunction · 0.85
parse_argsMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected