src/pybel/cli.py
def prune(manager: Manager):
    """Prune nodes not belonging to any edges."""
    nodes_to_delete = [
        node
        for node in tqdm(manager.session.query(Node), total=manager.count_nodes())
        if not node.networks
    ]
    manager.session.delete(nodes_to_delete)
    manager.session.commit()
Prune nodes not belonging to any edges.
Prune nodes not belonging to any edges.
Prune nodes not belonging to any edges .
def prune(manager: Manager):
    nodes_to_delete = [
        node
        for node in tqdm(manager.session.query(Node), total=manager.count_nodes())
        if not node.networks
    ]
    manager.session.delete(nodes_to_delete)
    manager.session.commit()
def prune ( manager : Manager ) : nodes_to_delete = [ node for node in tqdm ( manager . session . query ( Node ) , total = manager . count_nodes ( ) ) if not node . networks ] manager . session . delete ( nodes_to_delete ) manager . session . commit ( )
Prune nodes not belonging to any edges.
Prune nodes not belonging to any edges .
"""Prune nodes not belonging to any edges."""
manager
Manager