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

Function _prompt_build

ci/inspect_obj.py:28–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def _prompt_build() -> Path:
29 builds = _list_builds()
30 if not builds:
31 print("Error: No builds found", file=sys.stderr)
32 sys.exit(1)
33 print("Select a build:")
34 for i, build in enumerate(builds):
35 print(f" [{i}]: {build}")
36 while True:
37 try:
38 which = int(input("Enter the number of the build to use: "))
39 if 0 <= which < len(builds):
40 valid = _check_build(BUILD / builds[which])
41 if valid:
42 return BUILD / builds[which]
43 print("Error: Invalid build", file=sys.stderr)
44 else:
45 print("Error: Invalid selection", file=sys.stderr)
46 continue
47 except ValueError:
48 print("Error: Invalid input", file=sys.stderr)
49 continue
50
51
52def _prompt_object_file(build: Path) -> Path:

Callers 1

cliFunction · 0.70

Calls 3

_list_buildsFunction · 0.70
_check_buildFunction · 0.70
printFunction · 0.50

Tested by

no test coverage detected