def main() -> int: """Prints an error message.""" args = argument_parser().parse_args() relative_dir = args.dir[len(args.root):].rstrip('/') _LOG.error('') _LOG.error('The target %s is not a compiled protobuf library.', colors().bold_white(args.target)) _LOG.error('') _LOG.error('A different target is generated for each active generator.') _LOG.error('Depend on one of the following targets instead:') _LOG.error('') for gen in args.generators: _LOG.error(' //%s:%s_%s', relative_dir, args.target, gen) _LOG.error('') return 1
def print_banner() -> None: """Prints the colorful PIGWEED banner to stderr.""" print(colors().magenta(_PIGWEED_BANNER), file=sys.stderr)