MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / print_key_values

Function print_key_values

scripts/compile_cpp.py:160–169  ·  view source on GitHub ↗

Print a key-value pair with the key left-aligned to the given length, but only if the verbose flag is set.

(key: str, values: list[str], length: int)

Source from the content-addressed store, hash-verified

158
159
160def print_key_values(key: str, values: list[str], length: int) -> None:
161 """Print a key-value pair with the key left-aligned to the given length, but only if the verbose flag is set."""
162 if args.verbose:
163 print_ansi((key + ":").ljust(length), ANSI.fg_bright_white, ANSI.bold)
164 if len(values) == 0:
165 print("<None>")
166 else:
167 print(values[0])
168 for value in values[1:]:
169 print(" " * length + f"{value}")
170
171
172def print_error_and_exit(message: str) -> Never:

Callers 1

compile_cpp.pyFile · 0.70

Calls 1

print_ansiFunction · 0.85

Tested by

no test coverage detected