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

Function _prompt_build

ci/util/tools.py:69–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67
68
69def _prompt_build() -> Path:
70 builds = _list_builds()
71 if not builds:
72 print("Error: No builds found", file=sys.stderr)
73 sys.exit(1)
74 print("Select a build:")
75 for i, build in enumerate(builds):
76 print(f" [{i}]: {build}")
77 while True:
78 try:
79 which = int(input("Enter the number of the build to use: "))
80 if 0 <= which < len(builds):
81 valid = _check_build(BUILD / builds[which])
82 if valid:
83 return BUILD / builds[which]
84 print("Error: Invalid build", file=sys.stderr)
85 else:
86 print("Error: Invalid selection", file=sys.stderr)
87 continue
88 except ValueError:
89 print("Error: Invalid input", file=sys.stderr)
90 continue
91
92
93def _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