Exemplo n.º 1
0
def _check_label_args(args, ctx):
    cmd_impl_support.check_required_args(
        [
            "set",
            "append",
            "prepend",
            "remove",
            "clear",
        ],
        args,
        ctx,
    )
    cmd_impl_support.check_incompatible_args(
        [
            ("set", "append"),
            ("set", "prepend"),
            ("set", "remove"),
            ("set", "clear"),
            ("append", "prepend"),
            ("append", "clear"),
            ("append", "remove"),
            ("prepend", "clear"),
            ("prepend", "remove"),
        ],
        args,
        ctx,
    )
Exemplo n.º 2
0
def _check_args(args, ctx):
    if args.path and os.path.isabs(args.path):
        cli.error("PATH must be relative\n"
                  "Try 'guild open --help' for more information.")
    cmd_impl_support.check_incompatible_args([
        ("shell", "cmd"),
        ("shell_cmd", "shell"),
        ("shell_cmd", "cmd"),
    ], args, ctx)
Exemplo n.º 3
0
def _check_args(args, ctx):
    cmd_impl_support.check_incompatible_args(
        [
            ("table", "csv"),
            ("table", "tool"),
            ("csv", "tool"),
        ],
        args,
        ctx,
    )
Exemplo n.º 4
0
def _check_list_runs_args(args, ctx):
    cmd_impl_support.check_incompatible_args(
        [
            ("comments", "verbose"),
            ("comments", "json"),
            ("json", "verbose"),
            ("archive", "deleted"),
        ],
        args,
        ctx,
    )
Exemplo n.º 5
0
def _check_comment_args(args, ctx):
    cmd_impl_support.check_incompatible_args(
        [
            ("list", "add"),
            ("list", "delete"),
            ("list", "clear"),
            ("add", "delete"),
            ("add", "clear"),
            ("edit", "delete"),
            ("edit", "clear"),
            ("delete", "clear"),
        ],
        args,
        ctx,
    )
Exemplo n.º 6
0
def _check_comment_args_for_remote(args, ctx):
    _check_comment_args(args, ctx)
    cmd_impl_support.check_incompatible_args(
        [
            ("remote", "edit"),
        ],
        args,
        ctx,
    )
    cmd_impl_support.check_required_args(
        [
            "list",
            "add",
            "delete",
            "clear",
        ],
        args,
        ctx,
        msg_template="--remote option required on of: %s",
    )
Exemplo n.º 7
0
def _check_select_args(args, ctx):
    cmd_impl_support.check_incompatible_args([("min", "max"),], args, ctx)
Exemplo n.º 8
0
def _validate_args(args, ctx):
    incompatible = [
        ("working", "dir"),
        ("working", "sourcecode"),
    ]
    cmd_impl_support.check_incompatible_args(incompatible, args, ctx)
Exemplo n.º 9
0
def _check_select_args(args, ctx):
    cmd_impl_support.check_incompatible_args([("short_id", "attr")], args, ctx)