INNER CODE UNIT · Python

hard_targets

yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:1672

    hard_targets = list(node or []) + list(edge or [])
    soft_target = edit_node_key or edit_edge_key
    if (hard_targets or soft_target or document) and sum(
        bool(x) for x in (hard_targets, soft_target, document)
    ) > 1:
        console.print(
            "[red]Error:[/red] Choose ONE of: --node/--edge (hard delete), "
            "--edit-node/--edit-edge (soft delete), or --document "
            "(whole-document rollback)."
        )
        raise typer.Exit(1)
    if soft_target and not fact and not instruction:
        console.print("[red]Error:[/red] Soft delete needs --fact or --instruction.")
        raise typer.Exit(1)
    if document and not (Path(document).name or document):
        pass  # unreachable; keeps option semantics explicit
    if not hard_targets and not soft_target and not document:
        console.print(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…