def main(args): cmd_impl_support.init_model_path() formatted = [_format_op(op, model) for op, model in _iter_ops(args.path)] filtered = [op for op in formatted if _filter_op(op, args)] cli.table(sorted(filtered, key=lambda m: m["fullname"]), cols=["fullname", "description"], detail=(["main", "flags", "details"] if args.verbose else []))
def main(args): cmd_impl_support.init_model_path() filtered = filtered_ops(args) cli.table( sorted(filtered, key=_op_sort_key), cols=["fullname", "description"], detail=(["main", "flags", "details"] if args.verbose else []), )
def main(args): cmd_impl_support.init_model_path() formatted = [_format_model(m) for m in iter_models(args.path)] filtered = [m for m in formatted if _filter_model(m, args)] cli.table( sorted(filtered, key=lambda m: m["fullname"]), cols=["fullname", "description"], detail=(["source", "operations", "details"] if args.verbose else []))
def _ac_operation(ctx, incomplete, **_kw): from guild import cmd_impl_support from . import operations_impl cmd_impl_support.init_model_path() ops = operations_impl.filtered_ops(click_util.Args(**ctx.params)) return sorted([ op["fullname"] for op in ops if op["fullname"].startswith(incomplete) ])
def f(): with _test.StderrCapture(): cmd_impl_support.init_model_path() return [ op["fullname"] for op in operations_impl.filtered_ops(ops_args) ]