Skip to content

Commit 134be9c

Browse files
Merge pull request #1494 from datajoint/docs/1484-propagate-invariant-docstring
docs(#1484): document pair-keyed part-to-master invariant in _propagate_restrictions
2 parents 29598c7 + 0d0b3b5 commit 134be9c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/datajoint/diagram.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,12 @@ def _propagate_restrictions(self, start_node, mode, part_integrity="enforce"):
696696
Walks the dependency graph in topological order, applying
697697
propagation rules at each edge. Only processes descendants of
698698
start_node to avoid duplicate propagation when chaining.
699+
700+
Invariant (``part_integrity="cascade"``): each restricted Part fires
701+
its own upward walk to its Master exactly once — deduplicated per
702+
``(part, master)`` pair (``visited_part_master_pairs``), not per
703+
master — so a Master reached through several restricted Parts is
704+
restricted from every one of them.
699705
"""
700706

701707
sorted_nodes = topo_sort(self)

0 commit comments

Comments
 (0)